Eloquent\Phony\Mock\Builder\MockBuilder::__construct PHP Метод

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

Each value in $types can be either a class name, or an ad hoc mock definition. If only a single type is being mocked, the class name or definition can be passed without being wrapped in an array.
public __construct ( mixed $types, MockFactory $factory, HandleFactory $handleFactory, InvocableInspector $invocableInspector, FeatureDetector $featureDetector )
$types mixed The types to mock.
$factory Eloquent\Phony\Mock\MockFactory The factory to use.
$handleFactory Eloquent\Phony\Mock\Handle\HandleFactory The handle factory to use.
$invocableInspector Eloquent\Phony\Invocation\InvocableInspector The invocable inspector.
$featureDetector Eloquent\Phony\Reflection\FeatureDetector The feature detector to use.
    public function __construct($types, MockFactory $factory, HandleFactory $handleFactory, InvocableInspector $invocableInspector, FeatureDetector $featureDetector)
    {
        $this->isTraitSupported = $featureDetector->isSupported('trait');
        $this->isAnonymousClassSupported = $featureDetector->isSupported('class.anonymous');
        $this->isRelaxedKeywordsSupported = $featureDetector->isSupported('parser.relaxed-keywords');
        $this->isEngineErrorExceptionSupported = $featureDetector->isSupported('error.exception.engine');
        $this->isDateTimeInterfaceSupported = interface_exists('DateTimeInterface');
        $this->factory = $factory;
        $this->handleFactory = $handleFactory;
        $this->invocableInspector = $invocableInspector;
        $this->featureDetector = $featureDetector;
        $this->types = array();
        $this->parentClassName = null;
        $this->customMethods = array();
        $this->customProperties = array();
        $this->customStaticMethods = array();
        $this->customStaticProperties = array();
        $this->customConstants = array();
        $this->isFinalized = false;
        $this->emptyCallback = function () {
        };
        if (null !== $types) {
            $this->like($types);
        }
    }