PHP Class Scalr\Acl\Resource\ResourceObject

Contains all information about existing resource
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
__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 méthode

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

getDescription() public méthode

Gets description of the ACL resource
public getDescription ( ) : string
Résultat string The description of the resource

getGroup() public méthode

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

getMode() public méthode

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

getName() public méthode

Gets ACL resource name
public getName ( ) : string
Résultat string Returns the name of the resource

getPermissions() public méthode

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

getResourceId() public méthode

Gets ID of the resource
public getResourceId ( ) : integer
Résultat integer returns ID of the resource

hasPermission() public méthode

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