Eloquent\Phony\Stub\StubData::__construct PHP Метод

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

Construct a new stub data instance.
public __construct ( callable | null $callback, mixed $self, string | null $label, callable $defaultAnswerCallback, MatcherFactory $matcherFactory, MatcherVerifier $matcherVerifier, Invoker $invoker, InvocableInspector $invocableInspector, EmptyValueFactory $emptyValueFactory, GeneratorAnswerBuilderFactory $generatorAnswerBuilderFactory )
$callback callable | null The callback, or null to create an anonymous stub.
$self mixed The self value.
$label string | null The label.
$defaultAnswerCallback callable The callback to use when creating a default answer.
$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.
    public function __construct($callback, $self, $label, $defaultAnswerCallback, MatcherFactory $matcherFactory, MatcherVerifier $matcherVerifier, Invoker $invoker, InvocableInspector $invocableInspector, EmptyValueFactory $emptyValueFactory, GeneratorAnswerBuilderFactory $generatorAnswerBuilderFactory)
    {
        parent::__construct($callback, $label);
        if (empty($self)) {
            $self = $this->callback;
        }
        $this->defaultAnswerCallback = $defaultAnswerCallback;
        $this->matcherFactory = $matcherFactory;
        $this->matcherVerifier = $matcherVerifier;
        $this->invoker = $invoker;
        $this->invocableInspector = $invocableInspector;
        $this->emptyValueFactory = $emptyValueFactory;
        $this->generatorAnswerBuilderFactory = $generatorAnswerBuilderFactory;
        $this->secondaryRequests = array();
        $this->answers = array();
        $this->rules = array();
        $this->setSelf($self);
    }