29 $part = $this->parts[$class] ?? [];
30 foreach ($part as $partArray) {
32 $elm->fromArray($partArray);
33 $elements[$partArray[
'name']] = $elm;
45 foreach ($this->aclsArray as $aclArray) {
47 $aclElement->fromArray($aclArray);
48 $acls[$aclElement->getId_()] = $aclElement;
54 $this->aclsArray[$aclElement->
getId_()] = $aclElement->
toArray();
58 unset($this->aclsArray[$aclElement->
getId_()]);
76 return $this->loadAllPart(
Resource::class);
85 return $this->loadAllPart(
Role::class);
89 $class = \get_class($part);
90 $this->parts[$class][$part->getName()] = $part->toArray();
94 $class = \get_class($part);
95 $this->parts[$class][$id] = $part->toArray();
99 $name = $part->getName();
102 } elseif ($part instanceof
Role) {
105 $field =
'permission';
107 foreach ($this->aclsArray as $acl) {
108 if ($acl[$field][
'name'] === $name) {
109 throw new AclException(
"$name is in use in ACLs and can't be removed!");
112 unset($this->parts[\get_class($part)][$name]);
116 $name = $part->getName();
117 return isset($this->parts[\get_class($part)][$name]);
121 return isset($this->aclsArray[$aclElement->getId_()]);
135 $this->aclsArray = [];
Ubiquity\exceptions$AclException This class is part of Ubiquity.
Ubiquity\security\acl\models$AbastractAclElement This class is part of Ubiquity.
Ubiquity\security\acl\models$AclElement This class is part of Ubiquity.
Ubiquity\security\acl\models$Permission This class is part of Ubiquity.
Ubiquity\security\acl\models$Resource This class is part of Ubiquity.
Ubiquity\security\acl\models$Role This class is part of Ubiquity.
Ubiquity\security\acl\persistence$AclArrayProvider This class is part of Ubiquity.
removeAcl(AclElement $aclElement)
existPart(AbstractAclPart $part)
loadAllResources()
{Resource[]}
loadAllAcls()
{AclElement[]}
removePart(\Ubiquity\security\acl\models\AbstractAclPart $part)
updatePart(string $id,\Ubiquity\security\acl\models\AbstractAclPart $part)
loadAllPermissions()
{Permission[]}
saveAcl(AclElement $aclElement)
savePart(\Ubiquity\security\acl\models\AbstractAclPart $part)
existAcl(AclElement $aclElement)
Ubiquity\security\acl\persistence$AclProviderInterface This class is part of Ubiquity.
Class Configuration \config.