Beispiel #1
0
 /**
  * Inittiert Objekt mit Daten aus der Datenbank, sofern ID vergeben wurde
  */
 protected function init()
 {
     $data = $this->dbcon->fetch($this->dbcon->select($this->table, '*', "id = ?", array($this->id)));
     if (!$data) {
         trigger_error('Failed to load data for object of type "' . get_class($this) . '" with given id ' . $this->id . '!');
         return false;
     }
     $this->objExists = true;
     foreach ($data as $key => $value) {
         $this->{$key} = $value;
     }
 }
Beispiel #2
0
 /**
  * Inittiert Objekt mit Daten aus der Datenbank, sofern ID vergeben wurde
  */
 protected function init()
 {
     $data = $this->dbcon->fetch($this->dbcon->select($this->table, '*', "modkey " . $this->dbcon->dbLike() . " ?", array($this->modkey)));
     if (!$data) {
         return false;
     }
     $this->objExists = true;
     $this->isInstalled = true;
     foreach ($data as $key => $value) {
         $this->{$key} = $value;
     }
 }
Beispiel #3
0
 /**
  * Initialisiert
  */
 protected function init()
 {
     $res = $this->dbcon->fetch($this->dbcon->select($this->table, 'lastexec, execinterval', 'cjname ' . $this->dbcon->dbLike() . ' ?', array($this->cronName)));
     $this->lastExecTime = isset($res->lastexec) ? $res->lastexec : 0;
 }