PHP Класс Eloquent\Phony\Matcher\MatcherFactory

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

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

Метод Описание
__construct ( Eloquent\Phony\Matcher\Matcher $anyMatcher, WildcardMatcher $wildcardAnyMatcher, Eloquent\Phony\Exporter\Exporter $exporter ) Construct a new matcher factory.
adapt ( mixed $value ) : Eloquent\Phony\Matcher\Matcher Create a new matcher for the supplied value.
adaptAll ( array $values ) : array Create new matchers for the all supplied values.
addDefaultMatcherDrivers ( ) Add the default matcher drivers.
addMatcherDriver ( Eloquent\Phony\Matcher\MatcherDriver $driver ) Add a matcher driver.
any ( ) : Eloquent\Phony\Matcher\Matcher Create a new matcher that matches anything.
drivers ( ) : array Get the matcher drivers.
equalTo ( mixed $value, boolean $useSubstitution = false ) : Eloquent\Phony\Matcher\Matcher Create a new equal to matcher.
instance ( ) : MatcherFactory Get the static instance of this factory.
isMatcher ( mixed $value ) : boolean Returns true if the supplied value is a matcher.
wildcard ( mixed $value = null, integer $minimumArguments, integer | null $maximumArguments = null ) : WildcardMatcher Create a new matcher that matches multiple arguments.

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

__construct() публичный метод

Construct a new matcher factory.
public __construct ( Eloquent\Phony\Matcher\Matcher $anyMatcher, WildcardMatcher $wildcardAnyMatcher, Eloquent\Phony\Exporter\Exporter $exporter )
$anyMatcher Eloquent\Phony\Matcher\Matcher A matcher that matches any value.
$wildcardAnyMatcher WildcardMatcher A matcher that matches any number of arguments of any value.
$exporter Eloquent\Phony\Exporter\Exporter The exporter to use.

adapt() публичный метод

Create a new matcher for the supplied value.
public adapt ( mixed $value ) : Eloquent\Phony\Matcher\Matcher
$value mixed The value to create a matcher for.
Результат Eloquent\Phony\Matcher\Matcher The newly created matcher.

adaptAll() публичный метод

Create new matchers for the all supplied values.
public adaptAll ( array $values ) : array
$values array The values to create matchers for.
Результат array

addDefaultMatcherDrivers() публичный метод

Add the default matcher drivers.

addMatcherDriver() публичный метод

Add a matcher driver.
public addMatcherDriver ( Eloquent\Phony\Matcher\MatcherDriver $driver )
$driver Eloquent\Phony\Matcher\MatcherDriver The matcher driver.

any() публичный метод

Create a new matcher that matches anything.
public any ( ) : Eloquent\Phony\Matcher\Matcher
Результат Eloquent\Phony\Matcher\Matcher The newly created matcher.

drivers() публичный метод

Get the matcher drivers.
public drivers ( ) : array
Результат array

equalTo() публичный метод

Create a new equal to matcher.
public equalTo ( mixed $value, boolean $useSubstitution = false ) : Eloquent\Phony\Matcher\Matcher
$value mixed The value to check.
$useSubstitution boolean True to use substitution for wrapper types.
Результат Eloquent\Phony\Matcher\Matcher The newly created matcher.

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

Get the static instance of this factory.
public static instance ( ) : MatcherFactory
Результат MatcherFactory The static factory.

isMatcher() публичный метод

Returns true if the supplied value is a matcher.
public isMatcher ( mixed $value ) : boolean
$value mixed The value to test.
Результат boolean True if the value is a matcher.

wildcard() публичный метод

Create a new matcher that matches multiple arguments.
public wildcard ( mixed $value = null, integer $minimumArguments, integer | null $maximumArguments = null ) : WildcardMatcher
$value mixed The value to check for each argument.
$minimumArguments integer The minimum number of arguments.
$maximumArguments integer | null The maximum number of arguments.
Результат WildcardMatcher The newly created wildcard matcher.