Conditions | 3 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | protected function factoryTag($type, $key, $prop) |
||
43 | { |
||
44 | $tag = $this->createElement($this->elementPrefix.$type); |
||
45 | |||
46 | if (is_array($prop)) { |
||
47 | $tag->setAttribute('name', $key); |
||
48 | foreach ($prop as $k => $v) { |
||
49 | $tag->setAttribute($k, $v); |
||
50 | } |
||
51 | } else { |
||
52 | $tag->setAttribute('name', $prop); |
||
53 | } |
||
54 | |||
55 | return $tag; |
||
56 | } |
||
57 | } |
||
58 |