PHP Интерфейс Mongolid\Model\AttributesAccessInterface

It is supposed to be used in conjunction with Attributes trait
См. также: Attributes
Показать файл Открыть проект

Открытые методы

Метод Описание
cleanAttribute ( string $key ) : void Set a given attribute on the model.
fill ( array $input, boolean $force = false ) : void Set the model attributes using an array.
getAttribute ( string $key ) : mixed Get an attribute from the model.
getAttributes ( ) : mixed Get all attributes from the model.
setAttribute ( string $key, mixed $value ) : void Set a given attribute on the model.
syncOriginalAttributes ( ) : void Stores original attributes from actual data from attributes to be used in future comparisons about changes.

Описание методов

cleanAttribute() публичный метод

Set a given attribute on the model.
public cleanAttribute ( string $key ) : void
$key string Name of the attribute to be unset.
Результат void

fill() публичный метод

Set the model attributes using an array.
public fill ( array $input, boolean $force = false ) : void
$input array The data that will be used to fill the attributes.
$force boolean Force fill.
Результат void

getAttribute() публичный метод

Get an attribute from the model.
public getAttribute ( string $key ) : mixed
$key string The attribute to be accessed.
Результат mixed

getAttributes() публичный метод

Get all attributes from the model.
public getAttributes ( ) : mixed
Результат mixed

setAttribute() публичный метод

Set a given attribute on the model.
public setAttribute ( string $key, mixed $value ) : void
$key string Name of the attribute to be set.
$value mixed Value to be set.
Результат void

syncOriginalAttributes() публичный метод

Ideally should be called once right after retrieving data from the database.
public syncOriginalAttributes ( ) : void
Результат void