PHP 클래스 FluentDOM\Constraints

파일 보기 프로젝트 열기: fluentdom/fluentdom 1 사용 예제들

공개 메소드들

메소드 설명
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