148 abstract public function render();
165 if (substr(
$id, -2) ==
'[]') {
170 return parent::renderAttributeString();
182 if (is_array($this->value)) {
184 foreach ($this->value as
$value) {
185 $ret[] = $encode ? htmlspecialchars($value, ENT_QUOTES) :
$value;
189 return $encode ? htmlspecialchars($this->value, ENT_QUOTES) :
$this->value;
202 $this->value = (array)$this->value;
206 } elseif (is_array($this->value)) {
267 if (!empty($access) && (
false !== ($pos = strpos($str, $access)))) {
268 return htmlspecialchars(substr($str, 0, $pos), ENT_QUOTES)
269 .
'<span style="text-decoration: underline;">'
270 . htmlspecialchars(substr($str, $pos, 1), ENT_QUOTES) .
'</span>'
271 . htmlspecialchars(substr($str, $pos + 1), ENT_QUOTES);
273 return htmlspecialchars($str, ENT_QUOTES);
296 if ($class ===
false) {
299 return htmlspecialchars(implode(
' ', $class), ENT_QUOTES);
333 if (empty($this->pattern_description)) {
365 if (empty($this->datalist)) {
368 $ret = NWLINE .
'<datalist id="list_' . $this->
getName() .
'">' . NWLINE;
370 $ret .=
'<option value="' . htmlspecialchars($datalist, ENT_QUOTES) .
'">' . NWLINE;
372 $ret .=
'</datalist>' . NWLINE;
383 if (empty($this->datalist)) {
434 if (strlen($this->pattern_description) > 0) {
435 return htmlspecialchars(strip_tags($this->caption .
' - ' . $this->pattern_description), ENT_QUOTES);
437 return htmlspecialchars(strip_tags($this->caption), ENT_QUOTES);
463 return $encode ? htmlspecialchars($this->description, ENT_QUOTES) :
$this->description;
525 $this->extra = array(trim(
$extra));
527 $this->extra[] = trim(
$extra);
542 return implode(
' ', $this->extra);
545 foreach ($this->extra as $val) {
546 $value[] = str_replace(
'>',
'>', str_replace(
'<',
'<', $val));
559 if (!empty($this->customValidationCode)) {
560 return implode(NWLINE, $this->customValidationCode);
566 $eltmsg = empty($eltcaption)
569 $eltmsg = str_replace(array(
':',
'?',
'%'),
'', $eltmsg);
570 $eltmsg = str_replace(
'"',
'\"', stripslashes($eltmsg));
571 $eltmsg = strip_tags($eltmsg);
573 .
"if ( myform.{$eltname}.value == \"\" ) { window.alert(\"{$eltmsg}\");"
574 .
" myform.{$eltname}.focus(); return false; }\n";
setAttribute($name, $value=null)
addAttribute($name, $value)