getById() публичный статический Метод

public static getById ( $id ) : Element\Note
$id
Результат Element\Note
Пример #1
0
 /**
  * Loads a list of static routes for the specicifies parameters, returns an array of Element\Note elements
  *
  * @return array
  */
 public function load()
 {
     $notesData = $this->db->fetchCol("SELECT id FROM notes" . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $this->model->getConditionVariables());
     $notes = [];
     foreach ($notesData as $noteData) {
         if ($note = Model\Element\Note::getById($noteData)) {
             $notes[] = $note;
         }
     }
     $this->model->setNotes($notes);
     return $notes;
 }