PHP 인터페이스 ManaPHP\DiInterface

파일 보기 프로젝트 열기: manaphp/manaphp

공개 메소드들

메소드 설명
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