Documentation

FactoryDefinition
in package
implements Definition

Definition of a value or class with a factory.

Tags
author

Matthieu Napoli matthieu@mnapoli.fr

Table of Contents

Interfaces

Definition

Properties

$factory  : callable
Callable that returns the value.
$name  : string
Entry name.
$parameters  : array<string|int, mixed>
Factory parameters.

Methods

__construct()  : mixed
__toString()  : string
getCallable()  : callable|array<string|int, mixed>|string
getName()  : string
getParameters()  : array<string|int, mixed>
replaceNestedDefinitions()  : void
setName()  : void

Properties

$parameters

Factory parameters.

private array<string|int, mixed> $parameters

Methods

__construct()

public __construct(string $name, callable|array<string|int, mixed>|string $factory[, array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
$name : string

Entry name

$factory : callable|array<string|int, mixed>|string

Callable that returns the value associated to the entry name.

$parameters : array<string|int, mixed> = []

Parameters to be passed to the callable

getCallable()

public getCallable() : callable|array<string|int, mixed>|string
Return values
callable|array<string|int, mixed>|string

Callable that returns the value associated to the entry name.

getParameters()

public getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array containing the parameters to be passed to the callable, indexed by name.

replaceNestedDefinitions()

public replaceNestedDefinitions(callable $replacer) : void
Parameters
$replacer : callable

        
On this page

Search results