Exemplo n.º 1
0
 public function __construct($stdClass = null)
 {
     parent::__construct($stdClass);
     $this->load(LANG_COMMON);
     if ($stdClass == null) {
         return;
     }
     $this->load($stdClass);
 }
Exemplo n.º 2
0
 /**
  * @param  PObject
  * @param  string  Primary key
  * @return void
  * @throws IllegalOperationException if object is not yet persistent
  */
 public function delete(PObject $obj, $pk)
 {
     if (!$obj->{$pk}) {
         throw new IllegalOperationException('Object is not persistent');
     }
     $this->dbexec($this->fsql("DELETE FROM %s WHERE %s = '%s'", $obj->getStorageClass(), $pk, $obj->{$pk}));
 }