PHP Interface ManaPHP\DiInterface

Afficher le fichier Open project: manaphp/manaphp

Méthodes publiques

Méthode Description
get ( string $name, array $parameters = [] ) : mixed Resolves the service based on its configuration
getDefault ( ) : static Return the First DI created
getShared ( string $name, array $parameters = [] ) : mixed Resolves a shared service based on their configuration
has ( string $name ) : boolean Check whether the DI contains a service by a name
remove ( string $name ) : static Removes a service from the service container
set ( string $name, mixed $definition, boolean $shared = false, array $aliases = [] ) : static Registers a service in the service container
setShared ( string $name, mixed $definition, array $aliases = [] ) : static Registers an "always shared" service in the services container

Method Details

get() public méthode

Resolves the service based on its configuration
public get ( string $name, array $parameters = [] ) : mixed
$name string
$parameters array
Résultat mixed

getDefault() public static méthode

Return the First DI created
public static getDefault ( ) : static
Résultat static

getShared() public méthode

Resolves a shared service based on their configuration
public getShared ( string $name, array $parameters = [] ) : mixed
$name string
$parameters array
Résultat mixed

has() public méthode

Check whether the DI contains a service by a name
public has ( string $name ) : boolean
$name string
Résultat boolean

remove() public méthode

Removes a service from the service container
public remove ( string $name ) : static
$name string
Résultat static

set() public méthode

Registers a service in the service container
public set ( string $name, mixed $definition, boolean $shared = false, array $aliases = [] ) : static
$name string
$definition mixed
$shared boolean
$aliases array
Résultat static

setShared() public méthode

Registers an "always shared" service in the services container
public setShared ( string $name, mixed $definition, array $aliases = [] ) : static
$name string
$definition mixed
$aliases array
Résultat static