| @@ 963-967 (lines=5) @@ | ||
| 960 | } |
|
| 961 | ||
| 962 | // get aggregation array |
|
| 963 | if ($pipeline instanceof Pipeline) { |
|
| 964 | $pipeline = $pipeline->toArray(); |
|
| 965 | } elseif (!is_array($pipeline)) { |
|
| 966 | throw new Exception('Wrong pipeline specified'); |
|
| 967 | } |
|
| 968 | ||
| 969 | // log |
|
| 970 | $client = $this->_database->getClient(); |
|
| @@ 996-1001 (lines=6) @@ | ||
| 993 | throw new Exception('Explain of aggregation implemented only from 2.6.0'); |
|
| 994 | } |
|
| 995 | ||
| 996 | if($pipeline instanceof Pipeline) { |
|
| 997 | $pipeline = $pipeline->toArray(); |
|
| 998 | } |
|
| 999 | elseif(!is_array($pipeline)) { |
|
| 1000 | throw new Exception('Wrong pipeline specified'); |
|
| 1001 | } |
|
| 1002 | ||
| 1003 | // aggregate |
|
| 1004 | return $this->_database->executeCommand(array( |
|