PHP Интерфейс ManaPHP\DiInterface

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

get() публичный Метод

Resolves the service based on its configuration
public get ( string $name, array $parameters = [] ) : mixed
$name string
$parameters array
Результат mixed

getDefault() публичный статический Метод

Return the First DI created
public static getDefault ( ) : static
Результат static

getShared() публичный Метод

Resolves a shared service based on their configuration
public getShared ( string $name, array $parameters = [] ) : mixed
$name string
$parameters array
Результат mixed

has() публичный Метод

Check whether the DI contains a service by a name
public has ( string $name ) : boolean
$name string
Результат boolean

remove() публичный Метод

Removes a service from the service container
public remove ( string $name ) : static
$name string
Результат static

set() публичный Метод

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
Результат static

setShared() публичный Метод

Registers an "always shared" service in the services container
public setShared ( string $name, mixed $definition, array $aliases = [] ) : static
$name string
$definition mixed
$aliases array
Результат static