populateRecords() public method

Returns an array of records populated by incoming data
public populateRecords ( array $data, boolean $callAfterFind = true, string $index = null ) : array
$data array
$callAfterFind boolean
$index string
return array - Array of the records
Exemplo n.º 1
0
 /**
  * Execute query
  * @param bool $ac If set true will be returned array of EMongoDocuments if not hen array
  * of CBSONDocument
  * @return array
  */
 public function queryAll($ac = false) : array
 {
     $finded = $this->model->getCollection()->find($this->query, $this->options);
     $finded = iterator_to_array($finded);
     if ($ac === true) {
         return $this->model->populateRecords($finded, true, null, false);
     }
     return $finded;
 }