PHP Class Newscoop\Service\Resource\ResourceId

Afficher le fichier Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Свойство Type Description
$id string
$parent Newscoop\Service\Resource\ResourceId
$type string

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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() public méthode

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

getId() public méthode

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

getProperties() public méthode

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

getService() public méthode

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.
Résultat mixed The resource id obtained for this service request.

getType() public méthode

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

Property Details

$id protected_oe property

protected string $id
Résultat string

$parent protected_oe property

protected Newscoop\Service\Resource\ResourceId $parent
Résultat Newscoop\Service\Resource\ResourceId

$type protected_oe property

protected string $type
Résultat string