public function __construct($id = 0) { parent::__construct(); $this->sanitizeFunctions = self::$_sanitizeFunctions; $this->validateFunctions = self::$_validateFunctions; $this->infoKeys = self::$_infoKeys; $this->editKeys = self::$_editKeys; $this->table = self::TABLE; if ($id > 0) { $this->set('ID', $id); $this->hydrateFromDB(); } $this->submitClassName = __CLASS__; }
public function __construct($id) { $this->sanitizeFunctions = self::$_sanitizeFunctions; $this->validateFunctions = self::$_validateFunctions; $this->infoKeys = self::$_infoKeys; $this->editKeys = self::$_editKeys; $this->table = self::TABLE; parent::__construct(); $this->set('ID', $id); if (!$this->hasColumnChanged('ID')) { throw new Exception("Invalid Page ID {$id}."); } $this->submitClassName = __CLASS__; $this->hydrate(); }
public function get($key) { if (isset($this->originalDimensions->{$key})) { return $this->originalDimensions->{$key}; } return parent::get($key); }
public function toArray() { $arr = parent::toArray(); $arr['Children'] = isset($this->children) ? $this->children->runOnCollection('toArray') : array(); return $arr; }