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. |
/** * Outputs the stucture of the resources. * @ not a test */ public function printDefinition() { $reflection = new \ReflectionClass('Scalr\\Acl\\Acl'); foreach ($reflection->getConstants() as $name => $value) { if (strpos($name, 'GROUP_') === 0) { printf("\n%s:\n--\n", $value); $list = Definition::getByGroup($value); /* @var $resource \Scalr\Acl\Resource\ResourceObject */ foreach ($list as $resource) { printf(" %s - %s\n", $resource->getName(), $resource->getDescription()); foreach ($resource->getPermissions() as $permissionId => $description) { printf(" * %s - %s\n", ucfirst($permissionId), $description); } } } } }