PHP Interface Inpsyde\MultilingualPress\Service\Container

Since: 3.0.0
Inheritance: extends ArrayAcces\ArrayAccess
Afficher le fichier Open project: inpsyde/multilingual-press Interface Usage Examples

Méthodes publiques

Méthode Description
bootstrap ( ) : void Bootstraps (and locks) the container.
extend ( string $name, callable $new_factory ) : static Replaces the factory callback with the given name with the given factory callback.
lock ( ) : void Locks the container.
share ( string $name, mixed $value ) : static Stores the given value or factory callback with the given name, and defines it to be accessible even after the container has been bootstrapped.

Method Details

bootstrap() public méthode

Bootstraps (and locks) the container.
Since: 3.0.0
public bootstrap ( ) : void
Résultat void

extend() public méthode

Replaces the factory callback with the given name with the given factory callback.
Since: 3.0.0
public extend ( string $name, callable $new_factory ) : static
$name string The name of an existing factory callback.
$new_factory callable The new factory callback.
Résultat static Container instance.

lock() public méthode

Locks the container.
Since: 3.0.0
public lock ( ) : void
Résultat void

share() public méthode

Stores the given value or factory callback with the given name, and defines it to be accessible even after the container has been bootstrapped.
Since: 3.0.0
public share ( string $name, mixed $value ) : static
$name string The name of a value or factory callback.
$value mixed The value or factory callback.
Résultat static Container instance.