1 | <?php |
||
22 | class Collection extends BaseCollection implements ArrayAccess, Arrayable, Countable, IteratorAggregate, Jsonable, JsonSerializable |
||
23 | { |
||
24 | /** |
||
25 | * Arango.DB Connection |
||
26 | * |
||
27 | * @var \sonrac\Arango\Connection |
||
28 | * |
||
29 | * @author Donii Sergii <[email protected]> |
||
30 | */ |
||
31 | protected $connection; |
||
32 | |||
33 | /** |
||
34 | * Arango.DB collection object |
||
35 | * |
||
36 | * @var \ArangoDBClient\Collection |
||
37 | * |
||
38 | * @author Donii Sergii <[email protected]> |
||
39 | */ |
||
40 | protected $collection; |
||
41 | |||
42 | /** |
||
43 | * Items |
||
44 | * |
||
45 | * @var null|array |
||
46 | * |
||
47 | * @author Donii Sergii <[email protected]>4 |
||
48 | */ |
||
49 | protected $items = null; |
||
50 | |||
51 | /** |
||
52 | * Collection constructor. |
||
53 | * |
||
54 | * @param \sonrac\Arango\Connection $connection Arango.DB connection |
||
55 | * @param \ArangoDBClient\Collection $collection Arango.DB collection object |
||
56 | * |
||
57 | * @author Donii Sergii <[email protected]> |
||
58 | */ |
||
59 | public function __construct(Connection $connection, ArangoCollection $collection) |
||
65 | |||
66 | /** |
||
67 | * Get element from collection |
||
68 | * |
||
69 | * @param string $name |
||
70 | * |
||
71 | * @return mixed |
||
72 | * |
||
73 | * @author Donii Sergii <[email protected]> |
||
74 | */ |
||
75 | public function __get($name) |
||
83 | |||
84 | /** |
||
85 | * Add to collection |
||
86 | * |
||
87 | * @param string $name Name |
||
88 | * @param mixed $value Value |
||
89 | * |
||
90 | * @author Donii Sergii <[email protected]> |
||
91 | */ |
||
92 | public function __set($name, $value) |
||
96 | } |
||
97 |