/** * Gets ACL associated with the given object identity from the collections specified in $acls argument. * * @param \SplObjectStorage $acls * @param OID $oid * @return AclInterface|null */ protected function findAclByOid(\SplObjectStorage $acls, ObjectIdentity $oid) { $result = null; foreach ($acls as $aclOid) { if ($oid->equals($aclOid)) { $result = $acls->offsetGet($aclOid); break; } } return $result; }