$name = (string) $value; break; default: parent::__set( $name, $value ); } } public function output() { $output = array( 'get_id() . '"'; $output[] = ' name="' . $this->get_name() . '"'; $output[] = ' value="' . htmlspecialchars( $this->value, ENT_COMPAT, 'UTF-8' ) . '"'; if ( ! $this->autocomplete ) $output[] = ' autocomplete="off"'; if ( $this->placeholder ) $output[] = ' placeholder="' . htmlspecialchars( $this->placeholder, ENT_COMPAT, 'UTF-8' ) . '"'; if ( $this->class ) $output[] = ' class="' . $this->class . '"'; $output[] = ' />'; return implode( $output ); } }