| @@ 959-963 (lines=5) @@ | ||
| 956 | } |
|
| 957 | ||
| 958 | // get aggregation array |
|
| 959 | if ($pipeline instanceof Pipeline) { |
|
| 960 | $pipeline = $pipeline->toArray(); |
|
| 961 | } elseif (!is_array($pipeline)) { |
|
| 962 | throw new Exception('Wrong pipeline specified'); |
|
| 963 | } |
|
| 964 | ||
| 965 | // log |
|
| 966 | $client = $this->_database->getClient(); |
|
| @@ 992-997 (lines=6) @@ | ||
| 989 | throw new Exception('Explain of aggregation implemented only from 2.6.0'); |
|
| 990 | } |
|
| 991 | ||
| 992 | if($pipeline instanceof Pipeline) { |
|
| 993 | $pipeline = $pipeline->toArray(); |
|
| 994 | } |
|
| 995 | elseif(!is_array($pipeline)) { |
|
| 996 | throw new Exception('Wrong pipeline specified'); |
|
| 997 | } |
|
| 998 | ||
| 999 | // aggregate |
|
| 1000 | return $this->_database->executeCommand(array( |
|