PHP Класс Newscoop\Utils\Validation

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
__construct ( ) * ---------------------------------------------------------------

Описание методов

notEmpty() публичный статический Метод

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() публичный статический Метод

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'.