PHP Класс FluentDOM\Constraints

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

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

Метод Описание
assertNode ( mixed $node, string $message = 'DOMNode expected, got: %s.' ) : boolean
hasOption ( integer $options, integer $option ) : boolean Check options bitmask for an option
isCallable ( mixed $callback, boolean $allowGlobalFunctions = FALSE, boolean $silent = TRUE ) : callable | null check if parameter is a valid callback function. It returns the callable or NULL.
isNode ( mixed $node, boolean $ignoreTextNodes = FALSE ) : DOMElement | DOMText | DOMCdataSection Check if the DOMNode is DOMElement or DOMText with content.
isNodeList ( mixed $elements ) : Traversable | array Check if $elements is a traversable node list. It returns the $elements or NULL

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

Метод Описание
isCallableArray ( mixed $callback ) : boolean Return TRUE if the $callback is an array that can be an

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

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

public static assertNode ( mixed $node, string $message = 'DOMNode expected, got: %s.' ) : boolean
$node mixed
$message string
Результат boolean

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

Check options bitmask for an option
public static hasOption ( integer $options, integer $option ) : boolean
$options integer
$option integer
Результат boolean

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

If $silent is disabled, an exception is thrown for invalid callbacks
public static isCallable ( mixed $callback, boolean $allowGlobalFunctions = FALSE, boolean $silent = TRUE ) : callable | null
$callback mixed
$allowGlobalFunctions boolean
$silent boolean (no InvalidArgumentException)
Результат callable | null

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

It returns the node or NULL.
public static isNode ( mixed $node, boolean $ignoreTextNodes = FALSE ) : DOMElement | DOMText | DOMCdataSection
$node mixed
$ignoreTextNodes boolean
Результат DOMElement | DOMText | DOMCdataSection

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

Check if $elements is a traversable node list. It returns the $elements or NULL
public static isNodeList ( mixed $elements ) : Traversable | array
$elements mixed
Результат Traversable | array