1: <?php
2:
3: namespace PHPixie\Slice\Data;
4:
5: abstract class Implementation implements \PHPixie\Slice\Data
6: {
7: protected $sliceBuilder;
8:
9: 10: 11:
12: public function __construct($sliceBuilder)
13: {
14: $this->sliceBuilder = $sliceBuilder;
15: }
16:
17: 18: 19:
20: public function get($key = null, $default = null)
21: {
22: return $this->getData($key, false, $default);
23: }
24:
25: 26: 27:
28: public function getRequired($key = null)
29: {
30: return $this->getData($key, true);
31: }
32:
33: 34: 35:
36: protected function mergePath($prefix, $path = null)
37: {
38: if($prefix === null)
39: return $path;
40:
41: if ($path === null)
42: return $prefix;
43:
44: return $prefix.'.'.$path;
45: }
46: }
47: