Example #1
0
 /**
  * Sobrescreve o método find da BaseModel, para definir as propriedades "user" e "question", com os objetos \Models\User e \Models\Question correspondentes
  */
 public function find($value, $field = 'id', $fieldType = \PDO::PARAM_STR)
 {
     parent::find($value, $field, $fieldType);
     $this->user = new \Models\User();
     $this->user->find($this->user_id);
     $this->question = new \Models\Question();
     $this->question->find($this->question_id);
 }
 /**
  * Allows to query a set of records that match the specified conditions
  *
  * @param mixed $parameters
  * @return User[]
  */
 public static function find($parameters = null)
 {
     return parent::find($parameters);
 }
Example #3
0
 public function find($id)
 {
     $user = parent::find($id);
     $this->bindRoles($user, false);
     return $user;
 }