class Permission extends Entity implements IteratorAggregate

Class Permission

Properties

protected array $original The entity attribute's original state. from Entity
protected array $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

__construct(array $attributes = array())

Constructor

$this
syncOriginal()

Sync the original attributes with the current.

from Entity
array
getOriginal(string|null $key = null, mixed $default = null)

Get the entity's original attribute values.

from Entity
$this
fill(array $attributes)

Fill the model with an array of attributes.

from Entity
bool
isFillable(string $key)

Determine if the given attribute may be mass assigned.

from Entity
bool
isGuarded(string $key)

Determine if the given key is guarded.

from Entity
array
getDirty()

Get the attributes that have been changed since last sync.

from Entity
array
toArray()

Convert the entity instance to an array.

from Entity
void
addParent(Permission $parent)

Add parent to ancestor

bool
isParent(Permission $parent)

Check parent of current at a given.

getParent()

Returns parent registered

mixed|null
pure(string $key)

Get value of without inherit

void
setGrant(Grant $grant)

Set the grant

void
offsetSet(mixed $offset, mixed $value)

Set the item at a given offset.

void
offsetUnset(string $offset)

Unset the item at a given offset.

bool
offsetExists(mixed $offset)

Determine if an item exists at an offset.

mixed
offsetGet(mixed $offset)

Get an item at a given offset.

getIterator()

Get an iterator for the items.

array
getAttributes()

returns current attributes

int
getDepth()

Returns depth

Details

at line 56
__construct(array $attributes = array())

Constructor

Parameters

array $attributes attributes array

in Entity at line 84
$this syncOriginal()

Sync the original attributes with the current.

Return Value

$this

in Entity at line 98
array getOriginal(string|null $key = null, mixed $default = null)

Get the entity's original attribute values.

Parameters

string|null $key key name
mixed $default default value when not exists

Return Value

array

in Entity at line 109
$this fill(array $attributes)

Fill the model with an array of attributes.

Parameters

array $attributes attributes

Return Value

$this

in Entity at line 126
bool isFillable(string $key)

Determine if the given attribute may be mass assigned.

Parameters

string $key key name

Return Value

bool

in Entity at line 145
bool isGuarded(string $key)

Determine if the given key is guarded.

Parameters

string $key key name

Return Value

bool

in Entity at line 155
array getDirty()

Get the attributes that have been changed since last sync.

Return Value

array

in Entity at line 165
array toArray()

Convert the entity instance to an array.

Return Value

array

at line 70
void addParent(Permission $parent)

Add parent to ancestor

Parameters

Permission $parent parent instance

Return Value

void

at line 85
protected bool isParent(Permission $parent)

Check parent of current at a given.

Parameters

Permission $parent parent instance

Return Value

bool

at line 98
Permission getParent()

Returns parent registered

Return Value

Permission

at line 109
mixed|null pure(string $key)

Get value of without inherit

Parameters

string $key grant action name

Return Value

mixed|null

at line 120
void setGrant(Grant $grant)

Set the grant

Parameters

Grant $grant grant object

Return Value

void

at line 132
void offsetSet(mixed $offset, mixed $value)

Set the item at a given offset.

Parameters

mixed $offset array offset
mixed $value array value

Return Value

void

at line 143
void offsetUnset(string $offset)

Unset the item at a given offset.

Parameters

string $offset array offset

Return Value

void

at line 154
bool offsetExists(mixed $offset)

Determine if an item exists at an offset.

Parameters

mixed $offset array offset

Return Value

bool

at line 165
mixed offsetGet(mixed $offset)

Get an item at a given offset.

Parameters

mixed $offset array offset

Return Value

mixed

at line 176
ArrayIterator getIterator()

Get an iterator for the items.

Return Value

ArrayIterator

at line 186
array getAttributes()

returns current attributes

Return Value

array

at line 198
int getDepth()

Returns depth

Return Value

int