function __construct($value, $text = null, $selected = false) { $attributes = array(); $attributes['value'] = $value; if (null === $text) { $text = $value; } parent::__construct('option', $attributes, $text); if ($selected == true) { $this->setSelected(true); } }
function __toString() { if ($this->element instanceof CheckBox) { $this->element->html_override(null); $inner = $this->inner; if ($this->before) { $this->inner = (string) $this->element . $this->inner; } else { $this->inner .= (string) $this->element; } $this->element->html_override(''); $ret = parent::__toString(); $this->inner = $inner; return $ret; } return parent::__toString(); }
function __construct($href, $rel = 'stylesheet', $media = null) { parent::__construct('link', array('rel' => $rel, 'href' => $href, 'media' => $media)); }
function __construct($src = null, $type = 'text/javascript') { parent::__construct('script', array('src' => $src, 'type' => $type)); $this->singleClose = false; }
function __construct($name, $content) { parent::__construct('meta', array('name' => $name, 'content' => $content)); }
function __construct($tag, $name) { parent::__construct($tag, compact('name')); }