public function __construct($options = array(), $name = '', $id = '')
{
/* Create an WPDKHTMLTag instance. */
parent::__construct(WPDKHTMLTagName::SELECT);
/* Store the options for draw later. */
$this->_options = $options;
/* Set name. */
if (!empty($name)) {
$this->name = $name;
}
/* To default, if $name exists and $id not exists, then $id = $name. */
if (!empty($name) && empty($id)) {
/* Check if field is an array. */
if ('[]' == substr($name, -2)) {
/* Sanitize id. */
$this->id = substr($name, 0, strlen($name) - 2);
} else {
$this->id = $name;
}
} elseif (!empty($id)) {
$this->id = $id;
}
/* Setting. */
$this->open = '<select';
$this->close = '</select>';
$this->attributes = array('autofocus', 'disabled', 'form', 'multiple', 'name', 'size');
}