| Conditions | 4 |
| Paths | 4 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function bind(\DomNode $element, $data, $type = 'data') { |
||
| 20 | //This is a bit of a hack to workaround #24, might need a better way of doing this if it causes a problem |
||
| 21 | if (is_array($data) && $this->isObjectArray($data)) $data = $data[0]; |
||
| 22 | $content = isset($this->elementMap[$element]) ? $this->elementMap[$element] : []; |
||
| 23 | $content[$type] = $data; |
||
| 24 | $this->elementMap[$element] = $content; |
||
| 25 | } |
||
| 26 | |||
| 39 | } |