1 | <?php |
||
27 | class Command |
||
28 | { |
||
29 | |||
30 | use Traits\AvailableCommands; |
||
31 | |||
32 | /** |
||
33 | * |
||
34 | * @var AnnotatedInterface |
||
35 | */ |
||
36 | private $model = null; |
||
37 | |||
38 | /** |
||
39 | * |
||
40 | * @var Mangan |
||
41 | */ |
||
42 | private $mn = null; |
||
43 | |||
44 | 4 | public function __construct(AnnotatedInterface $model = null) |
|
54 | |||
55 | 3 | public function call($command, $arguments = []) |
|
83 | |||
84 | public function __call($name, $arguments) |
||
92 | |||
93 | /** |
||
94 | * Explicitly creates a collection or view. |
||
95 | * |
||
96 | * Parameter `$params` depends on MongoDB version, |
||
97 | * see (official documentation)[https://docs.mongodb.com/manual/reference/command/create/] for details |
||
98 | * |
||
99 | * @param string $collectionName The name of the new collection |
||
100 | * @param array $params |
||
101 | * @return array |
||
102 | */ |
||
103 | 1 | public function create($collectionName, $params = []) |
|
110 | |||
111 | /** |
||
112 | * The `collStats` command returns a variety of storage statistics for a given collection. |
||
113 | * |
||
114 | * @param string $collectionName The name of the target collection. If the collection does not exist, collStats returns an error message. |
||
115 | * @param int $scale Optional. The scale used in the output to display the sizes of items. By default, output displays sizes in bytes. To display kilobytes rather than bytes, specify a scale value of 1024. The scale factor rounds values to whole numbers. |
||
116 | * @param boolean $verbose Optional. When true, collStats increases reporting for the MMAPv1 Storage Engine. Defaults to false. |
||
117 | * @return array |
||
118 | */ |
||
119 | 1 | public function collStats($collectionName, $scale = 1, $verbose = false) |
|
128 | |||
129 | } |
||
130 |