Create input.

@param string $name
@param string $value
@param string $id
@param string $class
@param array $attrs
@return string
12899
public function input($name, $value = '', $id = '', $class = '', array $attrs = array())
    {
        return '<input id="' . $id . '" class="' . $class . '" type="' . $this->_type . '" name="' . $name . '"
                          value="' . $value . '" ' . $this->buildAttrs($attrs) . '/>';
    }
546108
public function date($name = null, $value = null, $attr = null)
    {
        return $this->createInput('date', $name, $value, $attr);
    }
1263025
public function html($name, $html, array $attr = null)
    {
        return $this->input($name, [ 'type' => 'html', 'html' => $html, 'attr' => $attr ]);
    }
915895
public function render($content, $class = '', $id = '', array $attrs = array())
    {
        $attrs = $this->_setId($attrs, $id);
        $attrs = $this->_cleanAttrs($attrs);

        if (!empty($class)) {
            $attrs = $this->_normalizeClassAttr($attrs, $class);
        }

        $tag = $this->_tag;
        if (Arr::key('tag', $attrs)) {
            $tag = $attrs['tag'];
            unset($attrs['tag']);
        }

        $format = (!empty($attrs)) ? '<%s %s>%s</%s>' : '<%s%s>%s</%s>';
        $output = sprintf($format, $tag, $this->buildAttrs($attrs), $content, $tag);

        return $output;
    }
27337
public function setInputHidden(
        string $name = '',
        string $value = '',
        string $id = '',
        string $class = '',
        array $options = []
    ): InputInterface {
        $this->setType(self::TYPE_HIDDEN)
            ->setName($name)
            ->setValue($value)
            ->setId($id)
            ->setClass($class)
            ->setOptions($options);

        return $this;
    }
1203726
private static String make(final CharSequence name,
        final CharSequence value, final CharSequence... attrs) {
        final StringBuilder text = new StringBuilder(
            String.format("%s=%s;", name, value)
        );
        for (final CharSequence attr : attrs) {
            text.append(attr).append(';');
        }
        return text.toString();
    }
430852
public function attr($name, $value = null)
    {
        $attrs = (array) $this->getAttribute('attribs');

        if ($value === null) {
            return isset($attrs[$name]) ? $attrs[$name] : null;
        }

        $attrs[$name] = $value;

        $this->setAttribute('attribs', $attrs);

        return $this;
    }
229937
public static function createBySelector($selector, $value = null, array $attributes = [])
    {
        return Document::create()->createElementBySelector($selector, $value, $attributes);
    }
289061
public function setAttributesSubmit(
        $name = 'btn_submit',
        $id = 'btn_submit',
        $value = 'Send',
        $style = '',
        $cssClass = ''
    ) {
        $this->_setNameSubmit = $name;
        $this->_setIdSubmit = $id;
        $this->_setValueSubmit = $value;
        $this->_setStyleSubmit = $style;
        $this->_setClassSubmit = $cssClass;

        return $this;
    }
528967
public function appendAttr($name, $value, $separator = '')
    {
        if ($this->existsAttr($name)) {

            if ($name == 'class') {
                $separator = ' ';
            }

            $this->attrs[$name] .= $separator . trim($value);

        } else {
            $this->attrs[trim($name)] = trim($value);
        }

        return $this;
    }
849021
function text($name, $value, $attr)
    {
        $html = '';
        if (isset($attr['options'])) {
            if (!isset($attr['id'])) $attr['id'] = 'txt'.ucfirst($name);
            $html .= static::datalist($attr['id'].'_datalist', $attr['options']);
        }
        $attr['list'] = $attr['id'].'_datalist';
        $html .= $this->input($name, $value, $attr);
        return $html;

    }
1173613
public function submit($name, $value = null, $attributes = null)
    {
        return '<input type="submit" name="'.$name.'" '.(($attributes !== null) ? $this->attributes($attributes) : "").' value="'.$this->getValue($name, $value).'" />';
    }
583462
public function input($type, $name, $value = null, array $attributes = array(), array $extra = array())
    {
        return $this->build($type, $name, $value, $attributes, $extra);
    }
792698
public function buildFormElement($itemName = '', $name = '', $value = '', $id = '', $class = '', $itemValue = '', $attributes = [])
    {
        // Create form input
        $id = $id ?: 'fe' . mt_rand();
        $element = new FormElement($this->getHTMLDocument(), $itemName, $name, $value, $id, $class, $itemValue, $attributes);

        // Return form element
        return $element;
    }
327533
protected function createAttributeValue($name, $value) {
    // If the value is already an AttributeValueBase object,
    // return a new instance of the same class, but with the new name.
    if ($value instanceof AttributeValueBase) {
      $class = get_class($value);
      return new $class($name, $value->value());
    }
    // An array value or 'class' attribute name are forced to always be an
    // AttributeArray value for consistency.
    if ($name == 'class' && !is_array($value)) {
      // Cast the value to string in case it implements MarkupInterface.
      $value = [(string) $value];
    }
    if (is_array($value)) {
      // Cast the value to an array if the value was passed in as a string.
      // @todo Decide to fix all the broken instances of class as a string
      // in core or cast them.
      $value = new AttributeArray($name, $value);
    }
    elseif (is_bool($value)) {
      $value = new AttributeBoolean($name, $value);
    }
    // As a development aid, we allow the value to be a safe string object.
    elseif (SafeMarkup::isSafe($value)) {
      // Attributes are not supposed to display HTML markup, so we just convert
      // the value to plain text.
      $value = PlainTextOutput::renderFromHtml($value);
      $value = new AttributeString($name, $value);
    }
    elseif (!is_object($value)) {
      $value = new AttributeString($name, $value);
    }
    return $value;
  }
47963
public function submit($name, $value, array $attr = null)
    {
        $basic = $this->merge_attr([ 'value' => $value ], $attr);

        return $this->input($name, [ 'type' => 'submit', 'attr' => $basic ]);
    }
1218730
public function button($value, $name = null, $attributes = array())
    {
        $name = pick($name, $value);

        return $this->tag('button', $value)
                    ->set(array('id' => $name, 'name' => $name))
                    ->set($attributes);
    }