Total Complexity | 6 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait HasMeta |
||
8 | { |
||
9 | /** |
||
10 | * @var array stores the meta items for this class |
||
11 | */ |
||
12 | protected $_meta = []; |
||
13 | |||
14 | /** |
||
15 | * Returns the meta items |
||
16 | * |
||
17 | * @param null $key the key to return |
||
|
|||
18 | * @param null $default a default if the $key is missing |
||
19 | * @return array |
||
20 | */ |
||
21 | public function meta($key = null, $default = null) { |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Adds items to the meta content keeping any that already exist |
||
35 | * |
||
36 | * @param $fields |
||
37 | */ |
||
38 | public function addMeta($fields) { |
||
39 | $this->_meta = array_merge($fields, $this->_meta); |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Replaces a meta item |
||
44 | * |
||
45 | * @param $key |
||
46 | * @param $value |
||
47 | */ |
||
48 | public function replaceMeta($key, $value) { |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Returns the UUID of the Block |
||
54 | * @return string |
||
55 | */ |
||
56 | public function uuid() { |
||
58 | } |
||
59 | } |