1: <?php
2:
3: namespace PHPixie\ORM\Relationships\Type\OneTo\Type\Many\Property\Query;
4:
5: class Items extends \PHPixie\ORM\Relationships\Type\OneTo\Property\Query
6: {
7: public function add($items)
8: {
9: $plan = $this->handler->linkPlan($this->side->config(), $this->query, $items);
10: $plan->execute();
11: $this->handler->resetProperties($this->side, $items);
12: return $this;
13: }
14:
15: public function remove($items)
16: {
17: $plan = $this->handler->unlinkPlan($this->side->config(), $this->query, $items);
18: $plan->execute();
19: $this->handler->resetProperties($this->side, $items);
20: return $this;
21: }
22:
23: public function removeAll()
24: {
25: $plan = $this->handler->unlinkItemsPlan($this->side->config(), $this->query, null);
26: $plan->execute();
27: return $this;
28: }
29: }
30: