1 | <?php |
||
48 | abstract class AbstractContext implements ContextInterface |
||
49 | { |
||
50 | /** |
||
51 | * Current default vocabulary |
||
52 | * |
||
53 | * @var VocabularyInterface |
||
54 | */ |
||
55 | protected $defaultVocabulary = null; |
||
56 | |||
57 | /** |
||
58 | * Parent thing |
||
59 | * |
||
60 | * @var ThingInterface |
||
61 | */ |
||
62 | protected $parentThing; |
||
63 | |||
64 | /** |
||
65 | * Return the registered child things |
||
66 | * |
||
67 | * @return ThingInterface[] Child things |
||
68 | */ |
||
69 | 7 | public function getChildren() |
|
73 | |||
74 | /** |
||
75 | * Get the current parent thing |
||
76 | * |
||
77 | * @return ThingInterface|null Parent thing |
||
78 | */ |
||
79 | 8 | public function getParentThing() |
|
83 | |||
84 | /** |
||
85 | * Set the parent thing |
||
86 | * |
||
87 | * @param ThingInterface $parentThing Parent thing |
||
88 | * @return ContextInterface Self reference |
||
89 | */ |
||
90 | 9 | public function setParentThing(ThingInterface $parentThing) |
|
101 | |||
102 | /** |
||
103 | * Add a child thing |
||
104 | * |
||
105 | * @param ThingInterface $thing Child thing |
||
106 | * @return ContextInterface Self reference |
||
107 | */ |
||
108 | 8 | public function addChild(ThingInterface $thing) |
|
113 | |||
114 | /** |
||
115 | * Return the current default vocabulary |
||
116 | * |
||
117 | * @return VocabularyInterface Current default vocabulary |
||
118 | */ |
||
119 | 11 | public function getDefaultVocabulary() |
|
123 | } |
||
124 |