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:
After the reader is done parsing, the validation results can be examined with:
Source for this file: /Configuration/src/validation_result.php
Version: | //autogen// |
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. |
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 |
Constructs a validation result
Initializes the validation result with some information on the configuration file and an empty result list.
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. |
Appends the validation item to the result list.
Name | Type | Description |
---|---|---|
$item |
ezcConfigurationValidationItem | The error or warning item which should be added to the end of the result list. |
Returns the number of errors
Returns a list with validation items
Returns the number of warnings