PHP 인터페이스 Mongolid\Model\AttributesAccessInterface

It is supposed to be used in conjunction with Attributes trait
또한 보기: Attributes
파일 보기 프로젝트 열기: leroy-merlin-br/mongolid

공개 메소드들

메소드 설명
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