PHP 클래스 ManaPHP\Di

상속: implements manaphp\DiInterface
파일 보기 프로젝트 열기: manaphp/manaphp 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_aliases array
$_default Di First DI build
$_services array
$_sharedInstances array

공개 메소드들

메소드 설명
__call ( string $method, array $arguments = [] ) : void Magic method to get or set services using setters/getters
__construct ( )
__debugInfo ( ) : array
__get ( string $propertyName ) : mixed Magic method __get
__isset ( string $name ) : boolean
__set ( string $name, mixed $value )
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 service, the resolved service is stored in the DI, subsequent requests for this service will return the same instance
has ( string $name ) : boolean Check whether the DI contains a service by a name
remove ( string $name ) : static Removes a service in the services container
set ( string $name, mixed $definition, boolean $shared = false, array $aliases = [] ) : static Registers a service in the services container
setShared ( string $name, mixed $definition, array $aliases = [] ) : static Registers an "always shared" service in the services container

메소드 상세

__call() 공개 메소드

Magic method to get or set services using setters/getters
public __call ( string $method, array $arguments = [] ) : void
$method string
$arguments array
리턴 void

__construct() 공개 메소드

public __construct ( )

__debugInfo() 공개 메소드

public __debugInfo ( ) : array
리턴 array

__get() 공개 메소드

Magic method __get
public __get ( string $propertyName ) : mixed
$propertyName string
리턴 mixed

__isset() 공개 메소드

public __isset ( string $name ) : boolean
$name string
리턴 boolean

__set() 공개 메소드

public __set ( string $name, mixed $value )
$name string
$value mixed

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 service, the resolved service is stored in the DI, subsequent requests for this service will return the same instance
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 in the services container
public remove ( string $name ) : static
$name string
리턴 static

set() 공개 메소드

Registers a service in the services 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

프로퍼티 상세

$_aliases 보호되어 있는 프로퍼티

protected array $_aliases
리턴 array

$_default 보호되어 있는 정적으로 프로퍼티

First DI build
protected static Di,ManaPHP $_default
리턴 Di

$_services 보호되어 있는 프로퍼티

protected array $_services
리턴 array

$_sharedInstances 보호되어 있는 프로퍼티

protected array $_sharedInstances
리턴 array