__construct()
__get()
__set()
asArray()
fill()
getModifiedData()
isNew()
reset()
revert()
convert()
getDataType()
$converter
$dataStructure
$reverter
$data
$is_new
$modified
The entity class is a representation of data from a data source as an object.
| package | Cactus |
|---|---|
| author | Dave Widmer |
__construct(array $data, array $structure)
arrayInitial data for a new entity.
arrayThe data structure of the entity properties
__get(string $name)
stringThe property name to get.
__set(string $name, mixed $value)
stringThe property name
mixedThe property value
asArray(array $keys) : array
arrayA list of keys to pull out in case all of the data isn't needed.
arrayfill(array $data)
arrayThe data to set
getModifiedData() : array
arrayisNew() : boolean
booleanrevert(array $data) : array
arrayThe data to revert. Uses internal data if nothing is passed in.
arrayconvert(string $name, mixed $value) : mixed
stringThe name of the property
mixedThe current value
mixedThe converted valuegetDataType(string $name) : mixed
stringThe property name to get the type of
mixedA string data type or boolean false$dataStructure : array
$data : array
$is_new : boolean
$modified : array