Class TAuthorizationRuleCollection
TAuthorizationRuleCollection class.
TAuthorizationRuleCollection represents a collection of authorization rules TAuthorizationRule. To check if a user is allowed, call isUserAllowed.
Method Summary |
void
|
Inserts an item at the specified position.
|
boolean
|
|
Methods Inherited From TList |
TList::add(), TList::clear(), TList::contains(), TList::copyFrom(), TList::count(), TList::getCount(), TList::getIterator(), TList::getReadOnly(), TList::indexOf(), TList::insertAt(), TList::itemAt(), TList::mergeWith(), TList::offsetExists(), TList::offsetGet(), TList::offsetSet(), TList::offsetUnset(), TList::remove(), TList::removeAt(), TList::setReadOnly(), TList::toArray()
|
Methods Inherited From TComponent |
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
|
Method Details |
insertAt
public void insertAt |
(integer $index , mixed $item ) |
Inserts an item at the specified position.
This overrides the parent implementation by performing additional operations for each newly added TAuthorizationRule object.
Input |
integer | $index | the specified position. |
mixed | $item | new item |
Output |
Exception |
throws | TInvalidDataTypeException if the item to be inserted is not a TAuthorizationRule object. |
|
isUserAllowed
public boolean isUserAllowed |
(IUser $user , string $verb , string $ip ) |
Input |
IUser | $user | the user to be authorized |
string | $verb | verb, can be empty, 'post' or 'get'. |
string | $ip | the request IP address |
Output |
boolean
| whether the user is allowed |
Exception |
|
|