Untitled
public text v1 · immutableclass Page_Model extends ORM {
protected $has_many = array('page_properties');
protected $properties = array();
public function __construct($id = FALSE)
{
parent::__construct($id);
if ($this->object->id != 0)
{
// Preload the properties
foreach($this->find_related_page_properties() as $property)
{
$this->properties[$property->name] = $property->value;
}
}
}
} // End Page_Model
class Page_Property_Model extends ORM {
protected $belongs_to = array('page');
}