添加text元素
@param $name
@param string $value
@param string $placeholder
@param bool $required
@param bool $readonly
@return $this
15559
public function addText($name , $title = '',$value = '' , $placeholder = '' , $required = false , $msg = '' ,$group = '',$readonly = false){

        $this->addInput('text' , $name , $title ,$value  , $placeholder  , $required  , $msg ,$group , $readonly );
        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;
    }
611715
protected function setHeader(string $name, $value)
    {
        \assert($this->isNameValid($name), "Invalid header name");

        if (\is_array($value)) {
            if (!$value) {
                $this->removeHeader($name);
                return;
            }

            $value = \array_values(\array_map("strval", $value));
        } else {
            $value = [(string) $value];
        }

        \assert($this->isValueValid($value), "Invalid header value");

        $name = \strtolower($name);
        $this->headers[$name] = $value;
    }
1024473
public function withAddedHeader($name, $value): self
    {
        $this->assertHeaderName($name);

        $clone = clone $this;
        $clone->headers->add($name, $value);

        return $clone;
    }
517696
public function tag(string $name, $value, bool $prefixed = true) : self
    {
        $value = $this->convertDate($value);

        $this->tags[] = $this->createTag($name, $value, $prefixed);

        return $this;
    }
668093
public function withAddedHeader($name, $value) : self
    {
        $new = clone $this;

        return $new->setResponse($this->response->withAddedHeader($name, $value));
    }
155960
public function text($name, $question, $required = false)
    {
        if (is_string($question)) {
            output()->write(
                (new Format())
                    ->setString(language()->getLine($question))
                    ->setSpace(1)
            );
        } elseif ($question instanceof Format or $question instanceof Text) {
            output()->write($question);
        }

        $standardInput = input()->standard();

        if ($required === true and empty($standardInput)) {
            $requiredText = (new Format())
                ->setColor((new Color())->setBackground(Color::RED))
                ->setString(' ' . language()->getLine('REQUIRED') . ' ')
                ->setIndent(1)
                ->__toString();

            $this->text($name, str_replace($requiredText, '', $question) . $requiredText, $required);

            return;
        }

        $_POST[ $name ] = $standardInput;
    }
178162
public function add(string $name, string $value, bool $replace = true): Headers
	{
		$normalizedName = $this->normalizeName($name);

		$this->headers[$normalizedName]['name'] = $name;

		if($replace === true)
		{
			$this->headers[$normalizedName]['value'] = [$value];
		}
		else
		{
			$headers = $this->headers[$normalizedName]['value'] ?? [];

			$this->headers[$normalizedName]['value'] = array_merge($headers, [$value]);
		}

		return $this;
	}
1281562
public function add(string $name, $value)
    {
        if (is_array($name)) {
            foreach ($name as $key => $value) {
                $this->data[$key] = $value;
            }

            return $this;
        }

        $this->data[$name] = $value;

        return $this;
    }
182296
public function setHeader($name, $value, $replace = false)
    {
        // Add multiple headers for the reponse as array
        if (is_array($name)) {
            foreach ($name as $headerKey => $headerValue) {
                $this->headers->set($headerKey, $headerValue, $replace);
            }

            return $this;
        }

        $this->headers->set($name, $value, $replace);

        return $this;
    }
860436
protected function _pushAttrValue(string $name, $value, bool $addValue = false): void {
        $this->collection()->each(function($node, $index) use($name, $value, $addValue) {
            if ($node instanceof \DOMElement) {
                $attr = $node->getAttribute($name);

                if (is_callable($value)) {
                    $value = $value($node, $index, $attr);
                }

                // Remove any existing instances of the value, or empty values.
                $values = array_filter(explode(' ', $attr), function($_value) use($value) {
                    if (strcasecmp($_value, $value) == 0 || empty($_value)) {
                        return false;
                    }

                    return true;
                });

                // If required add attr value to array
                if ($addValue) {
                    $values[] = $value;
                }

                // Set the attr if we either have values, or the attr already
                //  existed (we might be removing classes).
                //
                // Don't set the attr if it doesn't already exist.
                if (!empty($values) || $node->hasAttribute($name)) {
                    $node->setAttribute($name, implode(' ', $values));
                }
            }
        });
    }
1320197
public function type($value, $name, $clear = false)
    {
        $element = $this->findElement($name);

        if ($clear) {
            $element->clear();
        }

        $element->sendKeys($value);

        return $this;
    }
407060
public function addText($name, $label = '', $is_mandatory = true)
    {
        $e = new \FrenchFrogs\Form\Element\Text($name, $label);
        $this->addElement($e);

        if ($is_mandatory) {
            $e->addRule('required');
        } else {
            $e->addFilter('nullable');
        }

        return $e;
    }
503013
public function setOption($name, $value)
    {
        if (!is_null($this->new)) {
            //====================================================================//
            // Impact Block Data Array
            $this->new->option[$name] = $value;
        }

        return $this;
    }
322241
public function setHeader(string $name, string $value)
    {
        // Make sure the word has no spaces but dashes instead, and is
        // Camel-Cased. The dashes are first replaced with spaces to let
        // ucwords function properly, and afterwards all spaces are converted
        // to dashes.
        $name = ucwords(strtolower(str_replace('-', ' ', $name)));
        $name = str_replace(' ', '-', $name);

        $this->headers[$name] = $value;
        return $this;
    }
430425
public function placeholder(string $name, string $value): self
    {
        $this->placeholders[$name] = $value;
        return $this;
    }
630507
public function add($name, $value = null, $where = '')
    {
        if (!$this->has($name)) {
            $this->set($name, $value, $where);
        }

        return $this;
    }