Method |
Description |
|
__construct ( array $rules = [] ) |
RuleRepository constructor |
|
add ( Rule $rule ) : void |
Add a rule to the collection |
|
all ( ) : array |
Return a raw array of all rules |
|
count ( ) : integer |
Returns the number of rules |
|
first ( ) : Rule | null |
Return the first element in the array or null if empty |
|
getIterator ( ) : ArrayIterator |
Returns an iterator for the internal array |
|
getRelevantRules ( string $action, string $resource ) : RuleRepository |
Get all rules only relevant to the given action and resource |
|
isEmpty ( ) : boolean |
Determine if empty |
|
last ( ) : Rule | null |
Return the last element in the array or null if empty |
|
offsetExists ( $key ) : boolean |
Determine if the rule exists by key |
|
offsetGet ( $key ) : Rule |
Returns the requested Rule |
|
offsetSet ( $key, $value ) : void |
Sets the rule at the given key |
|
offsetUnset ( $key ) : void |
Unsets the rule at the given key |
|
reduce ( Closure $callback, mixed $initialValue = [] ) : RuleRepository |
Runs a reduce callback on the collection |
|