Exemple #1
0
 public static function restore($props)
 {
     $rv =& new Caddy();
     foreach ($props['items'] as $key => $value) {
         $rv->addCaddyItem(StoreObject::restore($value));
     }
     return $rv;
 }
 public static function restore($props)
 {
     $rv =& new FormInputConfiguration();
     foreach ($props['items'] as $key => $value) {
         $rv->add(StoreObject::restore($value));
     }
     return $rv;
 }
Exemple #3
0
 public static function restore($props)
 {
     $rv =& FormInputFabrication::createNew($props['type'], $props['name']);
     $rv->_value = $props['value'];
     $rv->_default_value = $props['default_value'];
     $rv->_configuration = StoreObject::restore($props['configuration']);
     return $rv;
 }
 public static function restore($props)
 {
     try {
         $value = StoreObject::restore($props['value']);
     } catch (TypeMismatchException $e) {
         $value = $props['value'];
     }
     return new CaddyItemFeature($props['key'], $value);
 }
 public function &loadById($caddyId)
 {
     $xml =& $this->_storage->getResource();
     $child = $xml->getElementById($caddyId);
     if (!is_null($child)) {
         $this->_caddy = StoreObject::restore($child->nodeValue());
         $this->_caddy_id = $caddyId;
         $this->_date_creation = $child->getAttribute('date_creation');
         $this->_date_update = $child->getAttribute('date_update');
     }
     return $this->_caddy;
 }
 public function &loadById($caddyId)
 {
     $sql =& new sqlBuilder();
     $alias = $sql->aliasTable('Caddy', 'c');
     $sql->get($alias, 'date_creation');
     $sql->get($alias, 'date_update');
     $sql->get($alias, 'blob_caddy');
     $sql->whereField($alias, 'id_caddy', $caddyId, '=', sqlBuilder::AndOperator);
     if ($rs =& $this->_storage->execute($sql->select())) {
         if ($rs->hasNext()) {
             $row =& $rs->next();
             $this->_caddy = StoreObject::restore($row['blob_caddy']);
             $this->_caddy_id = $caddyId;
             $this->_date_creation = $row['date_creation'];
             $this->_date_update = $row['date_update'];
             $rs->dispose();
         } else {
             $this->_caddy = null;
         }
     }
     return $this->_caddy;
 }
Exemple #7
0
 public static function restore($props)
 {
     $rv =& new CaddyItem($props['key'], $props['quantity'], $props['price']);
     foreach ($props['features'] as $key => $value) {
         $rv->addCaddyItemFeature(StoreObject::restore($value));
     }
     return $rv;
 }