1: <?php
2:
3: namespace PHPixie\ORM\Data\Types;
4:
5: class Document extends \PHPixie\ORM\Data\Type\Implementation
6: {
7: protected $document;
8:
9: public function __construct($document)
10: {
11: $this->document = $document;
12: }
13:
14: public function get($key, $default = null)
15: {
16: return $this->document->get($key, $default);
17: }
18:
19: public function getRequired($key)
20: {
21: return $this->document->getRequired($key);
22: }
23:
24: protected function setValue($key, $value)
25: {
26: $this->document->set($key, $value);
27: }
28:
29: public function data()
30: {
31: return $this->document->data();
32: }
33:
34: public function addArray($key, $data = array())
35: {
36: return $this->document->addArray($key, $data);
37: }
38:
39: public function addDocument($key, $data = null)
40: {
41: return $this->document->addDocument($key, $data);
42: }
43:
44: public function document()
45: {
46: return $this->document;
47: }
48: }
49: