PHP Класс Newscoop\Service\Resource\ResourceId

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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