DI\Definition\FactoryDefinition::__construct PHP Method

__construct() public method

public __construct ( string $name, callable $factory, string | null $scope = null, array $parameters = [] )
$name string Entry name
$factory callable Callable that returns the value associated to the entry name.
$scope string | null
$parameters array Parameters to be passed to the callable
    public function __construct($name, $factory, $scope = null, $parameters = [])
    {
        $this->name = $name;
        $this->factory = $factory;
        $this->scope = $scope;
        $this->parameters = $parameters;
    }