Apache Zeta Components Manual :: Docs For Class ezcConfigurationValidationResult
Configuration::ezcConfigurationValidationResult
Class ezcConfigurationValidationResult
Provides the result of an ezcConfigurationFileReader::validate() operation.
It contains the result of the validation process. The reader will create the result with location information and the validation items which is returned to the caller.
Instantiate an object of this class and append items using appendItem(). The caller can then access the result using getResultList().
The reader will typically create the result with:
- 'test-file.php', 2, 4, 'typo', 'One ] too many'
- );
- "settings", "site", "settings/site.ini"
- );
After the reader is done parsing, the validation results can be examined with:
- {
- );
- }
Source for this file: /Configuration/src/validation_result.php
Version: | //autogen// |
Member Variables
public mixed |
$isValid
= true
Holds information on whether the validation process was a success or not, will be true if successful and false if unsuccessful. The validation process will determine when a configuration is valid, for instance if a stricter validation is run it will set it as invalid even if it contains warnings. |
Method Summary
public ezcConfigurationValidationResult |
__construct(
$location
, $name
, $pathName
)
Constructs a validation result |
public void |
appendItem(
$item
)
Appends the validation item to the result list. |
public int |
getErrorCount(
)
Returns the number of errors |
public array(ezcConfigurationValidationItem) |
getResultList(
)
Returns a list with validation items |
public int |
getWarningCount(
)
Returns the number of warnings |
Methods
__construct
Constructs a validation result
Initializes the validation result with some information on the configuration file and an empty result list.
Parameters:
Name | Type | Description |
---|---|---|
$location |
string | The main placement for the configuration as returned by the reader. |
$name |
string | The name for the configuration as returned by the reader. |
$pathName |
string | A full path to the file being read by the reader. |
appendItem
Appends the validation item to the result list.
Parameters:
Name | Type | Description |
---|---|---|
$item |
ezcConfigurationValidationItem | The error or warning item which should be added to the end of the result list. |
getErrorCount
Returns the number of errors
getResultList
Returns a list with validation items
getWarningCount
Returns the number of warnings