Beispiel #1
0
 /**
  * Loads a user into the model
  *
  * @param mixed
  * @param string
  * @return this
  */
 public function load($value, $key = 'user_id')
 {
     $row = $this->_database->getRow('user', $key, $value);
     parent::__construct($row);
     return $this;
 }
Beispiel #2
0
 /**
  * Loads a jobpost into the model
  *
  * @param mixed
  * @param string
  * @return this
  */
 public function load($value, $key = 'jobpost_id')
 {
     jobpost_Error::i()->argument(1, 'scalar')->argument(2, 'string');
     $row = $this->_database->getRow('jobpost', $key, $value);
     parent::__construct($row);
     return $this;
 }