PHP Class Xpressengine\Support\Entity

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

Méthodes publiques

Свойство Type Description
$exists boolean Indicates if the entity exists.

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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 méthode

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

fill() public méthode

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

getDirty() public méthode

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

getOriginal() public méthode

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
Résultat array

isFillable() public méthode

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

isGuarded() public méthode

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

syncOriginal() public méthode

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

toArray() public méthode

Convert the entity instance to an array.
public toArray ( ) : array
Résultat array

Property Details

$exists public_oe property

Indicates if the entity exists.
public bool $exists
Résultat boolean

$fillable protected_oe property

The attributes that are mass assignable.
protected array $fillable
Résultat array

$guarded protected_oe property

The attributes that aren't mass assignable.
protected array $guarded
Résultat array

$hidden protected_oe property

The attributes that should be hidden for arrays.
protected array $hidden
Résultat array

$original protected_oe property

The entity attribute's original state.
protected array $original
Résultat array