Granada\ORM::find_many PHP Метод

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 | granada\ResultSet
Результат array | granada\ResultSet
    public function find_many()
    {
        if (self::$_config[$this->_connection_name]['return_result_sets']) {
            return $this->find_result_set();
        }
        return $this->_find_many();
    }

Usage Example

Пример #1
0
 /**
  * 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.
  * @return array|\Granada\ResultSet
  */
 public function find_many()
 {
     $instances = parent::find_many();
     return $instances ? Eager::hydrate($this, $instances, self::$_config[$this->_connection_name]['return_result_sets']) : $instances;
 }
ORM