public function __construct($name, $value = null, $options = array(1, 0)) { parent::__construct('Checkbox', $name); if (empty($options)) { $options = array(1, 0); } list($checked, $unchecked) = $options; if ($value == $checked) { $this->setAttribute('checked', 'checked'); } $this->setAttribute('value', $checked); }
public function __construct($name, $value = null) { parent::__construct('Radio', $name); $this->setAttribute('value', $value); }
public function __construct($name) { parent::__construct('Password', $name); }
public function __construct($name, $src, $label = null) { parent::__construct('Image', $name); $this->setAttribute('src', $src); $this->setAttribute('alt', $label); }
public function __construct($name, $value) { parent::__construct('Hidden', $name); $this->setAttribute('value', $value); }
public function __construct($name, $label) { parent::__construct('Button', $name); $this->setAttribute('value', $label); }