| 1 | <?php |
||
| 14 | class AnalyticModel |
||
| 15 | { |
||
| 16 | protected $collection; |
||
| 17 | protected $route; |
||
| 18 | protected $aggregate; |
||
| 19 | protected $schema; |
||
| 20 | protected $type; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * String collection |
||
| 24 | * @return mixed |
||
| 25 | */ |
||
| 26 | public function getCollection() |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Set value of collection |
||
| 33 | * @param mixed $collection string name |
||
| 34 | * @return void |
||
| 35 | */ |
||
| 36 | public function setCollection($collection) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Route path |
||
| 43 | * @return mixed |
||
| 44 | */ |
||
| 45 | public function getRoute() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Set path |
||
| 52 | * @param mixed $route string route |
||
| 53 | * @return void |
||
| 54 | */ |
||
| 55 | public function setRoute($route) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Mongodb Aggregates |
||
| 62 | * @return mixed |
||
| 63 | */ |
||
| 64 | public function getAggregate() |
||
| 65 | { |
||
| 66 | return $this->aggregate ?: []; |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Set mongodb query |
||
| 71 | * @param mixed $aggregate object type for query data |
||
| 72 | * @return void |
||
| 73 | */ |
||
| 74 | public function setAggregate($aggregate) |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Schema for response |
||
| 81 | * @return mixed |
||
| 82 | */ |
||
| 83 | public function getSchema() |
||
| 87 | |||
| 88 | /** |
||
| 89 | * Schema data |
||
| 90 | * @param mixed $schema object schema |
||
| 91 | * @return void |
||
| 92 | */ |
||
| 93 | public function setSchema($schema) |
||
| 97 | |||
| 98 | /** |
||
| 99 | * Type of response data |
||
| 100 | * @return mixed |
||
| 101 | */ |
||
| 102 | public function getType() |
||
| 106 | |||
| 107 | /** |
||
| 108 | * Type for representation |
||
| 109 | * @param mixed $type string view |
||
| 110 | * @return void |
||
| 111 | */ |
||
| 112 | public function setType($type) |
||
| 116 | } |
||
| 117 |