PHP Класс Eloquent\Phony\Stub\StubFactory

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

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

Метод Описание
__construct ( Sequencer $labelSequencer, MatcherFactory $matcherFactory, MatcherVerifier $matcherVerifier, Invoker $invoker, InvocableInspector $invocableInspector, EmptyValueFactory $emptyValueFactory, GeneratorAnswerBuilderFactory $generatorAnswerBuilderFactory ) Construct a new stub factory.
create ( callable | null $callback = null, mixed $self = null, callable $defaultAnswerCallback = 'Eloquent\Phony\Stub\StubData::returnsEmptyAnswerCallback' ) : Eloquent\Phony\Stub\Stub Create a new stub.
instance ( ) : StubFactory Get the static instance of this factory.

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

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

Construct a new stub factory.
public __construct ( Sequencer $labelSequencer, MatcherFactory $matcherFactory, MatcherVerifier $matcherVerifier, Invoker $invoker, InvocableInspector $invocableInspector, EmptyValueFactory $emptyValueFactory, GeneratorAnswerBuilderFactory $generatorAnswerBuilderFactory )
$labelSequencer Eloquent\Phony\Sequencer\Sequencer The label sequencer to use.
$matcherFactory Eloquent\Phony\Matcher\MatcherFactory The matcher factory to use.
$matcherVerifier Eloquent\Phony\Matcher\MatcherVerifier The matcher verifier to use.
$invoker Eloquent\Phony\Invocation\Invoker The invoker to use.
$invocableInspector Eloquent\Phony\Invocation\InvocableInspector The invocable inspector to use.
$emptyValueFactory EmptyValueFactory The empty value factory to use.
$generatorAnswerBuilderFactory Eloquent\Phony\Stub\Answer\Builder\GeneratorAnswerBuilderFactory The generator answer builder factory to use.

create() публичный Метод

Create a new stub.
public create ( callable | null $callback = null, mixed $self = null, callable $defaultAnswerCallback = 'Eloquent\Phony\Stub\StubData::returnsEmptyAnswerCallback' ) : Eloquent\Phony\Stub\Stub
$callback callable | null The callback, or null to create an anonymous stub.
$self mixed The self value.
$defaultAnswerCallback callable The callback to use when creating a default answer.
Результат Eloquent\Phony\Stub\Stub The newly created stub.

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

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