file form object.

@param string $name        = NULL
@param string $value       = NULL
@param array  $_attributes = []

@return string|object
973142
public function file(String $name = NULL, Bool $multiple = false, Array $_attributes = [])
    {
        if( ! empty($this->settings['attr']['multiple']) )
        {
            $multiple = true;
        }

        $name = $this->settings['attr']['name'] ?? $name;

        if( $multiple === true )
        {
            $this->settings['attr']['multiple'] = 'multiple';
            $name = Base::suffix($name, '[]');
        }

        $this->commonMethodsForInputElements('file');

        return $this->_input($name, '', $_attributes, 'file');
    }
170418
public function getValueAttribute($name, $value = null)
    {
        if (is_null($name)) return $value;

        if ( ! is_null($this->old($name)))
        {
            return $this->old($name);
        }

        if ( ! is_null($value)) return $value;

        if ($this->checkIfModelExists())
        {
            return $this->getModelValueAttribute($name);
        }

        if ($this->canUpdateValueWithSessionLang())
        {
            $language_input = $this->getOldLanguageInput();
            if($this->isAValidFormAttribute($name, $language_input)) return $language_input[$name];
        }
    }
1325592
public function datetimeLocal(String $name = NULL, String $value = NULL, Array $_attributes = [])
    {
        return $this->_input($name, $value, $_attributes, 'datetime-local');
    }
334180
public function getAttribute($attributes, $name) {
        foreach($attributes as $a) {
            if ($a->key == $name) {
                return $a->value;
            }
        }
        return null;
    }
492633
static function upload($name, $value = '', $attrArray = null)
    {
    	$attrStr = self::input_attr($attrArray);
    	$form = '';
        if(!empty($value))
            $form = " <a href='$value' target='_blank'>查看文件</a><br />\n重新上传";
        return $form."<input type='file' name='$name' id='{$name}' {$attrStr} />";
    }
8494
static function text($name,$value='',$attrArray=null)
	{
		if(!isset($attrArray['cols'])) $attrArray['cols'] = 60;
		if(!isset($attrArray['rows'])) $attrArray['rows'] = 3;
		$attrStr = self::input_attr($attrArray);
		$forms = "<textarea name='{$name}' id='{$name}' $attrStr>$value</textarea>";
		return $forms;
	}
254929
public function withAttribute(string $name, $value = null)
    {
        $this->attributes[$name] = $value;

        return $this;
    }
799666
protected function _elementTpl($name, $value = '', $id = '', $text = '', array $attrs = array())
    {
        $alias    = Str::slug($value, true);
        $inpClass = $this->_jbSrt('val-' . $alias);
        $input    = $this->input($name, $value, $id, $inpClass, $attrs);

        if ($this->_tpl === 'default') {
            return $input . $this->label($id, $alias, $text);
        } elseif ($this->_tpl === 'wrap') {
            return $this->label($id, $alias, $input . ' ' . $text);
        }

        if (is_callable($this->_tpl)) {
            return call_user_func($this->_tpl, $this, $name, $value, $id, $text, $attrs);
        }

        return null;
    }
825363
public function hasAttributeValue($name, $value = null)
    {
        if (!$this->hasAttribute($name)) {
            return false;
        }
        return (empty($value))? true : (array_search($value, $this->getArrayAttribute($name)) !== false);
    }
1351927
public static function combo($name, array $options, $value = null, array $attributes = array())
    {
        $input = self::setAttr($attributes, '<select{{attr}}>', $name, 'select');

        foreach ($options as $key => $val) {
            $input .= '<option value="' . self::entities($val) . '"';

            if ($value === $val) {
                $input .= ' selected';
            }

            $input .= '>' . $key . '</option>';
        }

        return $input . '</select>';
    }
3988
public static function input(string $name, string $value = '', array $attributes = null) : string
    {
        // Set the input name
        $attributes['name'] = $name;

        // Set the input id
        $attributes['id'] = (isset($attributes['id'])) ? $attributes['id'] : $name;

        // Set the input value
        $attributes['value'] = $value;

        if ( ! isset($attributes['type'])) {

            // Default type is text
            $attributes['type'] = 'text';
        }

        return '<input'.Html::attributes($attributes).'>';
    }
445802
public function input($name, $value = null, $attributes = null)
    {
        return '<input type="text" name="'.$name.'" value="'.$this->getValue($name, $value).'" '.(($attributes !== null) ? $this->attributes($attributes) : "").'/>';
    }
655783
public function withAttribute($name, $value)
    {
        $request             = clone $this;
        $request->attributes = clone $this->attributes;
        $request->attributes->set($name, $value);

        return $request;
    }
937497
private function getValue(array $attributes, $name, $default = null)
    {
        if (array_key_exists($name, $attributes) && !empty($attributes[$name])) {
            return $attributes[$name];
        }

        return $default;
    }
135998
public function button($name, $value = null, $attributes = null)
    {
        return '<input type="button" name="'.$name.'" '.(($attributes !== null) ? $this->attributes($attributes) : "").' value="'.$this->getValue($name, $value).'" />';
    }
1056594
public static function file($name, $accept = null, array $attributes = array())
    {
        if (!is_null($name)) {
            $attributes['name'] = $name;
        }

        if (!is_null($accept)) {
            $attributes['accept'] = $accept;
        }

        $node = new Node\File();
        return $node->render($attributes);
    }
1289404
public function createElement($name, $value = null, array $attributes = [])
    {
        $node = $this->document->createElement($name);

        return new Element($node, $value, $attributes);
    }