PHP Class kahlan\Matcher

Afficher le fichier Open project: crysalead/kahlan Class Usage Examples

Protected Properties

Свойство Type Description
$_classes array Class dependencies.
$_matchers array The matchers list

Méthodes publiques

Méthode Description
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.

Method Details

exists() public static méthode

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.
Résultat boolean Returns `true` if the matcher exists, `false` otherwise.

get() public static méthode

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.
Résultat array The registered matchers or a fully-namespaced class name if $name is not null.

register() public static méthode

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() public static méthode

Resets the class.
public static reset ( )

unregister() public static méthode

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.

Property Details

$_classes protected_oe property

Class dependencies.
protected array $_classes
Résultat array

$_matchers protected_oe static_oe property

The matchers list
protected static array $_matchers
Résultat array