class ConfigEntity extends Entity implements IteratorAggregate

대상의 설정을 가지고 제공해주는 클래스

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.
bool $exists Indicates if the entity exists. from Entity
protected ConfigVO $vo config value object
protected ConfigEntity $parent parent by this config object

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
void
fill(array $attributes)

Fill the model with an array of attributes.

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
setValueObject(array $attributes)

Set value object

array
all()

Get all of the items in the config entity.

mixed
get(string $name, mixed $default = null)

get value, chain of responsibility

array
getPureAll()

get pure object to array

mixed
getPure(string $name, mixed $default = null)

get pure value

void
set(string $name, mixed $value)

set entity value

void
clear()

entities clear

void
setParent(ConfigEntity $ancestor)

make hierarchy to upper

getParent()

get adjacency parent

int
getDepth()

depth level

boolean
isAdjacency(string $ancestorName, string $descendantName)

check adjacency

bool
offsetExists(string $offset)

Determine if a given offset exists.

mixed
offsetGet(string $offset)

Get the value at a given offset.

void
offsetSet(string $offset, mixed $value)

Set the value at a given offset.

void
offsetUnset(string $offset)

Unset the value at a given offset.

getIterator()

Get an iterator for the items.

array
getAttributes()

returns current attributes

mixed
__get(string $key)

Dynamically retrieve the value of an attribute.

Details

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

Constructor

Parameters

array $attributes name and variables

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

at line 87
void fill(array $attributes)

Fill the model with an array of attributes.

Parameters

array $attributes attributes in object

Return Value

void

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 74
private void setValueObject(array $attributes)

Set value object

Parameters

array $attributes name and variables

Return Value

void

at line 101
array all()

Get all of the items in the config entity.

Return Value

array

at line 115
mixed get(string $name, mixed $default = null)

get value, chain of responsibility

Parameters

string $name variable name
mixed $default default value

Return Value

mixed

at line 133
array getPureAll()

get pure object to array

Return Value

array

at line 145
mixed getPure(string $name, mixed $default = null)

get pure value

Parameters

string $name variable name
mixed $default default value

Return Value

mixed

at line 169
void set(string $name, mixed $value)

set entity value

Parameters

string $name variable name
mixed $value variable value

Return Value

void

at line 183
void clear()

entities clear

Return Value

void

at line 195
void setParent(ConfigEntity $ancestor)

make hierarchy to upper

Parameters

ConfigEntity $ancestor config object

Return Value

void

Exceptions

NoParentException

at line 212
ConfigEntity getParent()

get adjacency parent

Return Value

ConfigEntity

at line 222
int getDepth()

depth level

Return Value

int

at line 234
private boolean isAdjacency(string $ancestorName, string $descendantName)

check adjacency

Parameters

string $ancestorName higher level target name
string $descendantName lower level target name

Return Value

boolean

at line 245
bool offsetExists(string $offset)

Determine if a given offset exists.

Parameters

string $offset array key name

Return Value

bool

at line 256
mixed offsetGet(string $offset)

Get the value at a given offset.

Parameters

string $offset array key name

Return Value

mixed

at line 268
void offsetSet(string $offset, mixed $value)

Set the value at a given offset.

Parameters

string $offset array key name
mixed $value array value

Return Value

void

at line 279
void offsetUnset(string $offset)

Unset the value at a given offset.

Parameters

string $offset array key name

Return Value

void

at line 289
ArrayIterator getIterator()

Get an iterator for the items.

Return Value

ArrayIterator

at line 299
array getAttributes()

returns current attributes

Return Value

array

at line 312
mixed __get(string $key)

Dynamically retrieve the value of an attribute.

Parameters

string $key key

Return Value

mixed