Zeta Components Manual :: Docs For Class ezcConsoleDialogValidator
ConsoleTools::ezcConsoleDialogValidator
Interface ezcConsoleDialogValidator
Interface that every console dialog validator class must implement.
Source for this file: /ConsoleTools/src/interfaces/dialog_validator.php
Version: | //autogen// |
Descendants
Child Class | Description |
---|---|
ezcConsoleQuestionDialogValidator | Interface that every console question dialog validator class must implement. |
Constants
CONVERT_LOWER
= 1
|
Convert result to lower-case. |
CONVERT_NONE
= 0
|
Perform no conversion on the result. |
CONVERT_UPPER
= 2
|
Convert result to upper-case. |
Method Summary
public mixed |
fixup(
$result
)
Returns a fixed version of the result, if possible. |
public bool |
validate(
$result
)
Returns if the given result is valid. |
Methods
fixup
mixed
fixup(
mixed
$result
)
Returns a fixed version of the result, if possible.
This method tries to repair the submitted result, if it is not valid, yet. Fixing can be done in different ways, like casting into a certain datatype, string manipulation, creating an object. A result returned by fixup must not necessarily be valid, so a dialog should call validate after trying to fix the result.
Parameters:
Name | Type | Description |
---|---|---|
$result |
mixed | The received result. |
validate
bool
validate(
mixed
$result
)
Returns if the given result is valid.
Parameters:
Name | Type | Description |
---|---|---|
$result |
mixed | The received result. |
Documentation generated by phpDocumentor 1.4.3