1: <?php
2:
3: namespace PHPixie\ORM\Values;
4:
5: class Update
6: {
7: protected $values;
8:
9: protected $updates = array();
10:
11: public function __construct($values)
12: {
13: $this->values = $values;
14: }
15:
16: public function set($key, $value)
17: {
18: $this->updates[$key] = $value;
19: return $this;
20: }
21:
22: public function increment($key, $amount)
23: {
24: return $this->set($key, $this->values->updateIncrement($amount));
25: }
26:
27: public function remove($key)
28: {
29: return $this->set($key, $this->values->updateRemove());
30: }
31:
32: public function updates()
33: {
34: return $this->updates;
35: }
36: }