public function __construct(DOMElement $element) { parent::__construct($element); $this->_options = array(); $this->_optgroups = array(); // the dom element to process $element = $this->getDomElement(); // process all options foreach ($element->getElementsByTagName('option') as $opt) { // process items in optgroups differently if ($optgroup = $this->_getOptgroupLabel($opt)) { $this->_optgroups[$optgroup] = $opt->parentNode; } $this->_options[] = $opt; } }
/** * Constructor */ function __construct(DOMElement $element) { parent::__construct($element); }