public function getOptions()
    {
        $options = [];
        foreach ($this->childNodes as $child) {
            if ($child instanceof Select\Option) {
                $options[] = $child;
            } else if ($child instanceof Select\Optgroup) {
                foreach ($child->getChildren() as $c) {
                    if ($c instanceof Select\Option) {
                        $options[] = $c;
                    }
                }
            }
        }
        return $options;
    }