PHP 클래스 kahlan\Matcher

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

보호된 프로퍼티들

프로퍼티 타입 설명
$_classes array Class dependencies.
$_matchers array The matchers list

공개 메소드들

메소드 설명
exists ( string $name, string $target = '' ) : boolean Checks if a matcher is registered.
get ( string $name = null, string $target = '' ) : array Returns registered matchers.
register ( string $name, string $class, string $target = '' ) Registers a matcher.
reset ( ) Resets the class.
unregister ( mixed $name, string $target = '' ) Unregisters a matcher.

메소드 상세

exists() 공개 정적인 메소드

Checks if a matcher is registered.
public static exists ( string $name, string $target = '' ) : boolean
$name string The name of the matcher.
$target string An optional target class name.
리턴 boolean Returns `true` if the matcher exists, `false` otherwise.

get() 공개 정적인 메소드

Returns registered matchers.
public static get ( string $name = null, string $target = '' ) : array
$name string The name of the matcher.
$target string An optionnal target class name.
리턴 array The registered matchers or a fully-namespaced class name if $name is not null.

register() 공개 정적인 메소드

Registers a matcher.
public static register ( string $name, string $class, string $target = '' )
$name string The name of the matcher.
$class string A fully-namespaced class name.
$target string An optionnal target class name.

reset() 공개 정적인 메소드

Resets the class.
public static reset ( )

unregister() 공개 정적인 메소드

Unregisters a matcher.
public static unregister ( mixed $name, string $target = '' )
$name mixed The name of the matcher. If name is `true` unregister all the matchers.
$target string An optionnal target class name.

프로퍼티 상세

$_classes 보호되어 있는 프로퍼티

Class dependencies.
protected array $_classes
리턴 array

$_matchers 보호되어 있는 정적으로 프로퍼티

The matchers list
protected static array $_matchers
리턴 array