PHP Class Scalr\Acl\Resource\Definition

This class describes all known resources.
Since: 30.07.2013
Author: Vitaliy Demidov ([email protected])
Afficher le fichier Open project: scalr/scalr Class Usage Examples

Méthodes publiques

Méthode Description
get ( integer $resourceId ) : ResourceObject Gets the definition of the provided resource
getAll ( $raw = false ) : ArrayObject Gets all Resources
getByGroup ( string $group ) : ArrayObject Gets the list of the resources of specified associative group.
has ( integer $resourceId ) : boolean Checks if specified resource is defined

Method Details

get() public static méthode

Gets the definition of the provided resource
public static get ( integer $resourceId ) : ResourceObject
$resourceId integer The ID of the ACL resource
Résultat ResourceObject Returns the object which describes specified resource or null if it does not exist.

getAll() public static méthode

This method describes all available resources
public static getAll ( $raw = false ) : ArrayObject
Résultat ArrayObject Returns array looks like [ resource_id => [name, description, resourceGroup, [[permission_id => description)][, ModeInterface]] ] Third value of array is optional and determines unique permissions for specified resource which can be allowed or forbidden separately. Forth value of the array is optional Resource Mode.

getByGroup() public static méthode

Gets the list of the resources of specified associative group.
public static getByGroup ( string $group ) : ArrayObject
$group string The group identifier
Résultat ArrayObject Returns the list of the resources of the specified associative group.

has() public static méthode

Checks if specified resource is defined
public static has ( integer $resourceId ) : boolean
$resourceId integer The ID of the ACL resource
Résultat boolean Returns true if defined or false otherwise