Path

ez components / documentation / api reference / 2007.2.1 / consoletools


eZ Components 2007.2.1

ConsoleTools: ezcConsoleDialogValidator

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Interface: ezcConsoleDialogValidator

Interface for ezcConsoleDialog validator classes. [source]

Descendents

Child Class Description
ezcConsoleQuestionDialogValidator File containing the ezcConsoleQuestionDialogValidator class.

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.

Last updated: Thu, 31 Jan 2008