Eloquent\Phony\Mock\Builder\MockDefinition::__construct PHP Method

__construct() public method

Construct a new mock definition.
public __construct ( array $types, array $customMethods, array $customProperties, array $customStaticMethods, array $customStaticProperties, array $customConstants, string | null $className, boolean $isTraitSupported, boolean $isRelaxedKeywordsSupported )
$types array
$customMethods array
$customProperties array
$customStaticMethods array
$customStaticProperties array
$customConstants array
$className string | null The class name.
$isTraitSupported boolean True if traits are supported.
$isRelaxedKeywordsSupported boolean True if relaxed keywords are supported.
    public function __construct(array $types, array $customMethods, array $customProperties, array $customStaticMethods, array $customStaticProperties, array $customConstants, $className, $isTraitSupported, $isRelaxedKeywordsSupported)
    {
        $this->types = $types;
        $this->customMethods = $customMethods;
        $this->customProperties = $customProperties;
        $this->customStaticMethods = $customStaticMethods;
        $this->customStaticProperties = $customStaticProperties;
        $this->customConstants = $customConstants;
        $this->className = $className;
        $this->isTraitSupported = $isTraitSupported;
        $this->isRelaxedKeywordsSupported = $isRelaxedKeywordsSupported;
        $this->signature = array('types' => array_keys($types), 'customMethods' => array(), 'customProperties' => $customProperties, 'customStaticMethods' => array(), 'customStaticProperties' => $customStaticProperties, 'customConstants' => $customConstants, 'className' => $className);
        foreach ($customMethods as $name => $method) {
            list(, $reflector) = $method;
            $this->signature['customMethods'][$name] = array('custom', $reflector->getFileName(), $reflector->getStartLine(), $reflector->getEndLine());
        }
        foreach ($customStaticMethods as $name => $method) {
            list(, $reflector) = $method;
            $this->signature['customStaticMethods'][$name] = array('custom', $reflector->getFileName(), $reflector->getStartLine(), $reflector->getEndLine());
        }
    }