PHP Class Scalr\Acl\Resource\Definition

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

Public Methods

Method 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 method

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

getAll() public static method

This method describes all available resources
public static getAll ( $raw = false ) : ArrayObject
return 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 method

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

has() public static method

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