PHP Class Xpressengine\Support\Entity

Author: XE Developers ([email protected])
Inheritance: extends Illuminate\Support\Fluent
Exibir arquivo Open project: xpressengine/xpressengine Class Usage Examples

Public Properties

Property Type Description
$exists boolean Indicates if the entity exists.

Protected Properties

Property Type Description
$fillable array The attributes that are mass assignable.
$guarded array The attributes that aren't mass assignable.
$hidden array The attributes that should be hidden for arrays.
$original array The entity attribute's original state.

Public Methods

Method Description
__construct ( array $attributes = [] ) Constructor
fill ( array $attributes ) Fill the model with an array of attributes.
getDirty ( ) : array Get the attributes that have been changed since last sync.
getOriginal ( string | null $key = null, mixed $default = null ) : array Get the entity's original attribute values.
isFillable ( string $key ) : boolean Determine if the given attribute may be mass assigned.
isGuarded ( string $key ) : boolean Determine if the given key is guarded.
syncOriginal ( ) Sync the original attributes with the current.
toArray ( ) : array Convert the entity instance to an array.

Method Details

__construct() public method

Constructor
public __construct ( array $attributes = [] )
$attributes array attributes

fill() public method

Fill the model with an array of attributes.
public fill ( array $attributes )
$attributes array attributes

getDirty() public method

Get the attributes that have been changed since last sync.
public getDirty ( ) : array
return array

getOriginal() public method

Get the entity's original attribute values.
public getOriginal ( string | null $key = null, mixed $default = null ) : array
$key string | null key name
$default mixed default value when not exists
return array

isFillable() public method

Determine if the given attribute may be mass assigned.
public isFillable ( string $key ) : boolean
$key string key name
return boolean

isGuarded() public method

Determine if the given key is guarded.
public isGuarded ( string $key ) : boolean
$key string key name
return boolean

syncOriginal() public method

Sync the original attributes with the current.
public syncOriginal ( )

toArray() public method

Convert the entity instance to an array.
public toArray ( ) : array
return array

Property Details

$exists public_oe property

Indicates if the entity exists.
public bool $exists
return boolean

$fillable protected_oe property

The attributes that are mass assignable.
protected array $fillable
return array

$guarded protected_oe property

The attributes that aren't mass assignable.
protected array $guarded
return array

$hidden protected_oe property

The attributes that should be hidden for arrays.
protected array $hidden
return array

$original protected_oe property

The entity attribute's original state.
protected array $original
return array