PHP 클래스 phprs\Container

저자: caoym
파일 보기 프로젝트 열기: caoym/phprs-restful

공개 프로퍼티들

프로퍼티 타입 설명
$class API 实现类;
$factory
$path
$routes private $injectors=array();

공개 메소드들

메소드 설명
__construct ( string $class, string $method = null )
getImpl ( Request $request ) : object 获取API实现类的实例
getInjected ( ) : array 获取实例被注入的方法 只有实例被创建后才能取到值
load ( string $class, string $method )

메소드 상세

__construct() 공개 메소드

public __construct ( string $class, string $method = null )
$class string 类名
$method string 方法名, 如果为空, 则加载此类的所有方法

getImpl() 공개 메소드

获取API实现类的实例
public getImpl ( Request $request ) : object
$request Request
리턴 object

getInjected() 공개 메소드

获取实例被注入的方法 只有实例被创建后才能取到值
public getInjected ( ) : array
리턴 array

load() 공개 메소드

public load ( string $class, string $method )
$class string 类名
$method string ==null时load所有方法, !==null时load指定方法

프로퍼티 상세

$class 공개적으로 프로퍼티

API 实现类;
public $class

$factory 공개적으로 프로퍼티

public $factory

$path 공개적으로 프로퍼티

public $path

$routes 공개적으로 프로퍼티

private $injectors=array();
public $routes