Permission
class Permission extends Entity implements IteratorAggregate
Class Permission
Properties
| protected array | $original | The entity attribute's original state. | from Entity |
| $hidden | The attributes that should be hidden for arrays. | from Entity | |
| protected array | $fillable | The attributes that are mass assignable. | from Entity |
| protected array | $guarded | The attributes that aren't mass assignable. | from Entity |
| bool | $exists | Indicates if the entity exists. | from Entity |
| protected Permission | $parent | Parent Registered instance | |
| protected Grant | $grant | Grant object | |
| int | $id | int$id | |
| string | $siteKey | string$siteKey | |
| string | $name | string$name |
Methods
Constructor
Get the entity's original attribute values.
Returns parent registered
Get value of without inherit
Set the item at a given offset.
Unset the item at a given offset.
Determine if an item exists at an offset.
Get an item at a given offset.
Get an iterator for the items.
returns current attributes
Returns depth
Details
at line 56
__construct(array $attributes = array())
Constructor
in Entity at line 84
$this
syncOriginal()
Sync the original attributes with the current.
in Entity at line 98
array
getOriginal(string|null $key = null, mixed $default = null)
Get the entity's original attribute values.
in Entity at line 109
$this
fill(array $attributes)
Fill the model with an array of attributes.
in Entity at line 126
bool
isFillable(string $key)
Determine if the given attribute may be mass assigned.
in Entity at line 145
bool
isGuarded(string $key)
Determine if the given key is guarded.
in Entity at line 155
array
getDirty()
Get the attributes that have been changed since last sync.
in Entity at line 165
array
toArray()
Convert the entity instance to an array.
at line 70
void
addParent(Permission $parent)
Add parent to ancestor
at line 85
protected bool
isParent(Permission $parent)
Check parent of current at a given.
at line 98
Permission
getParent()
Returns parent registered
at line 109
mixed|null
pure(string $key)
Get value of without inherit
at line 120
void
setGrant(Grant $grant)
Set the grant
at line 132
void
offsetSet(mixed $offset, mixed $value)
Set the item at a given offset.
at line 143
void
offsetUnset(string $offset)
Unset the item at a given offset.
at line 154
bool
offsetExists(mixed $offset)
Determine if an item exists at an offset.
at line 165
mixed
offsetGet(mixed $offset)
Get an item at a given offset.
at line 176
ArrayIterator
getIterator()
Get an iterator for the items.
at line 186
array
getAttributes()
returns current attributes
at line 198
int
getDepth()
Returns depth