Example #1
0
 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;
     }
 }
Example #2
0
 /**
  * Constructor
  */
 function __construct(DOMElement $element)
 {
     parent::__construct($element);
 }