find_many() 공개 메소드

Tell the ORM that you are expecting multiple results from your query, and execute it. Will return an array of instances of the ORM class, or an empty array if no rows were returned.
public find_many ( ) : array | IdiormResultSet
리턴 array | IdiormResultSet
예제 #1
0
 /**
  * Wrap Idiorm's find_many method to return
  * an array of instances of the class associated
  * with this wrapper instead of the raw ORM class.
  */
 public function find_many()
 {
     return array_map(array($this, '_create_model_instance'), parent::find_many());
 }
예제 #2
0
파일: paris.php 프로젝트: florinp/dexonline
 /**
  * Wrap Idiorm's find_many method to return
  * an array of instances of the class associated
  * with this wrapper instead of the raw ORM class.
  *
  * @return Array
  */
 public function find_many()
 {
     $results = parent::find_many();
     foreach ($results as $key => $result) {
         $results[$key] = $this->_create_model_instance($result);
     }
     return $results;
 }
예제 #3
0
 /**
  * Wrap Idiorm's find_many method to return
  * an array of instances of the class associated
  * with this wrapper instead of the raw ORM class.
  */
 public function find_many($as_array = false)
 {
     $result = parent::find_many($as_array);
     if ($as_array) {
         return $result;
     }
     return array_map(array($this, '_create_model_instance'), $result);
 }