find_array() public method

Tell the ORM that you are expecting multiple results from your query, and execute it. Will return an array, or an empty array if no rows were returned.
public find_array ( ) : array
return array
コード例 #1
0
 /**
  * @param  null|integer $id
  * @return Model
  */
 public function get_datatable($options = array())
 {
     $limit = $this->_limit;
     $offset = $this->_offset;
     $this->_limit = null;
     $this->_offset = null;
     $this->cnt_query = true;
     $cnt = parent::find_array();
     if (isset($cnt[0]['_dt_record_cnt'])) {
         $cnt = $cnt[0]['_dt_record_cnt'];
     } else {
         // @todo throw error
         $cnt = 0;
     }
     $this->_limit = $limit;
     $this->_offset = $offset;
     $this->cnt_query = false;
     $results = $this->_create_json(parent::find_array(), $cnt, $options);
     return $results;
 }