Here a simple example:
public function __get($key)
{
if($key == 'date')
{
return date('d.m.Y',parent::__get($key));
}
return parent::__get($key);
}
public function __set($key, $value)
{
if($key == 'date')
{
$value = strtotime($value);
}
parent::__set($key, $value);
}
as_array() does not return what I would suspect doing $model->date.
Although I see there are some issues using Automodeler_ORM as it uses __get() for 1:1 and 1:m relations
Here a simple example:
as_array() does not return what I would suspect doing $model->date.
Although I see there are some issues using Automodeler_ORM as it uses __get() for 1:1 and 1:m relations