PHP 클래스 Newscoop\Service\Resource\ResourceId

파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$id string
$parent Newscoop\Service\Resource\ResourceId
$type string

공개 메소드들

메소드 설명
__construct ( string $id, $type = ResourceId::TYPE_ROOT ) Construct a resource id for the provided id.
getFullId ( ) : string Provides the full id of the resource, this id will be full path of the requesting layer components separated by ':'.
getId ( ) : string Provides the id of the resource, attention this is not the full id is just this resource id.
getProperties ( ) : array Provides the properties for the current resource id.
getService ( string $serviceName ) : mixed Provides the service for the requested service name.
getType ( ) : string Provides the type of the resource, please check the contstants on this class to see what are the posible types.

메소드 상세

__construct() 공개 메소드

The id should not be provided as a plain string it should be the actuall simple class name of the top class (Controller) that creates the resource.
public __construct ( string $id, $type = ResourceId::TYPE_ROOT )
$id string The id of the theme, must not be null or empty.

getFullId() 공개 메소드

Provides the full id of the resource, this id will be full path of the requesting layer components separated by ':'.
public getFullId ( ) : string
리턴 string The full id of the resource.

getId() 공개 메소드

Provides the id of the resource, attention this is not the full id is just this resource id.
public getId ( ) : string
리턴 string The id of the resource.

getProperties() 공개 메소드

Provides the properties for the current resource id.
public getProperties ( ) : array
리턴 array The array containing all the properties, not null can be empty.

getService() 공개 메소드

The id should not be provided as a plain string it should be the actuall class name ot the service API beeing requested. As a convention this id should be obtain from the NAME contstant of a interface (ex: IThemeService::NAME), where NAME is defined in the interface as 'const NAME = __CLASS__', if apllicable.
public getService ( string $serviceName ) : mixed
$serviceName string The class name of the interface beeing requested, must not be null or empty.
리턴 mixed The resource id obtained for this service request.

getType() 공개 메소드

Provides the type of the resource, please check the contstants on this class to see what are the posible types.
public getType ( ) : string
리턴 string The type of the resource.

프로퍼티 상세

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

protected string $id
리턴 string

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

protected Newscoop\Service\Resource\ResourceId $parent
리턴 Newscoop\Service\Resource\ResourceId

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

protected string $type
리턴 string