| 1 | <?php |
||
| 9 | class ElementData { |
||
| 10 | private $data; |
||
| 11 | private $elementMap; |
||
| 12 | |||
| 13 | public function __construct(\SplObjectStorage $elementMap, $data) { |
||
| 17 | |||
| 18 | /** Binds data to an element */ |
||
| 19 | public function bind(\DomNode $element, $data, $type = 'data') { |
||
| 26 | |||
| 27 | private function isObjectArray(array $data) { |
||
| 30 | |||
| 31 | /** Returns the data that has been bound to $element, or, if no data is bound to $element climb the DOM tree to find the data bound to a parent node*/ |
||
| 32 | public function getData(\DomElement $element = null, $type = 'data') { |
||
| 39 | } |