Example #1
0
 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__;
 }
Example #2
0
 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();
 }
Example #3
0
 public function get($key)
 {
     if (isset($this->originalDimensions->{$key})) {
         return $this->originalDimensions->{$key};
     }
     return parent::get($key);
 }
Example #4
0
 public function toArray()
 {
     $arr = parent::toArray();
     $arr['Children'] = isset($this->children) ? $this->children->runOnCollection('toArray') : array();
     return $arr;
 }