PHP Class Scalr\Acl\Resource\ResourceObject

Contains all information about existing resource
Since: 30.07.2013
Author: Vitaliy Demidov ([email protected])
Mostrar archivo Open project: scalr/scalr Class Usage Examples

Public Methods

Method Description
__construct ( integer $resourceId, array $definitionItem ) Constructor
getDescription ( ) : string Gets description of the ACL resource
getGroup ( ) : string Gets associative group which the resource belongs to.
getMode ( ) : Scalr\Acl\Resource\ModeInterface Gets Mode definition
getName ( ) : string Gets ACL resource name
getPermissions ( ) : array Gets available permissions definition for the resource
getResourceId ( ) : integer Gets ID of the resource
hasPermission ( string $permissionId ) Checks whether this resource has unique permission with specified ID.

Method Details

__construct() public method

Constructor
public __construct ( integer $resourceId, array $definitionItem )
$resourceId integer The ID of the ACL resource
$definitionItem array Array that describes resource

getDescription() public method

Gets description of the ACL resource
public getDescription ( ) : string
return string The description of the resource

getGroup() public method

Gets associative group which the resource belongs to.
public getGroup ( ) : string
return string Returns associative group which the resource belongs to.

getMode() public method

Gets Mode definition
public getMode ( ) : Scalr\Acl\Resource\ModeInterface
return Scalr\Acl\Resource\ModeInterface Returns the Mode definition if it exists

getName() public method

Gets ACL resource name
public getName ( ) : string
return string Returns the name of the resource

getPermissions() public method

Gets available permissions definition for the resource
public getPermissions ( ) : array
return array Returns permissions array that looks like array(permissionid => description)

getResourceId() public method

Gets ID of the resource
public getResourceId ( ) : integer
return integer returns ID of the resource

hasPermission() public method

Checks whether this resource has unique permission with specified ID.
public hasPermission ( string $permissionId )
$permissionId string The ID of the permission