Conditions | 6 |
Paths | 16 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function addTag(TagDefinition $definition, $data) |
||
29 | { |
||
30 | $parent = $this->result; |
||
31 | if (null === $this->currentUriAware) { |
||
32 | if ('media-segment' === $definition->getCategory()) { |
||
33 | $this->currentUriAware = new \ArrayObject(); |
||
34 | $this->result['mediaSegments'][] = $this->currentUriAware; |
||
35 | } elseif ($definition->isUriAware()) { |
||
36 | $this->currentUriAware = $data; |
||
37 | } |
||
38 | } |
||
39 | |||
40 | if ('media-segment' === $definition->getCategory()) { |
||
41 | $parent = $this->currentUriAware; |
||
42 | } |
||
43 | |||
44 | if ($definition->isMultiple()) { |
||
45 | $parent[$definition->getProperty()][] = $data; |
||
46 | |||
47 | return; |
||
48 | } |
||
49 | |||
50 | $parent[$definition->getProperty()] = $data; |
||
51 | } |
||
52 | |||
58 |