PHP Class Newscoop\Utils\Validation

ファイルを表示 Open project: sourcefabric/newscoop Class Usage Examples

Public Methods

Method Description
notEmpty ( mixed $parameter, string $name = 'unknown' ) Validates if the provided parameter is null or empty.
notNull ( mixed $parameter, string $name = 'unknown' ) Validates if the provided parameter is null.

Private Methods

Method Description
__construct ( ) * ---------------------------------------------------------------

Method Details

notEmpty() public static method

Will throw exception if this is the case.
public static notEmpty ( mixed $parameter, string $name = 'unknown' )
$parameter mixed The parameter to check for nullity or empty.
$name string The parameter name used for displaying the exception default 'unknown'.

notNull() public static method

Will throw exception if this is the case.
public static notNull ( mixed $parameter, string $name = 'unknown' )
$parameter mixed The parameter to check for nullity.
$name string The parameter name used for displaying the exception default 'unknown'.