@param string $text

@return $this
174724
public function setText(string $text)
    {
        $this->resource = mailparse_msg_create();
        $eaten = 0;
        $text_length = strlen($text);
        while ($eaten < $text_length) {
            mailparse_msg_parse($this->resource, substr($text, $eaten, 2082));
            $eaten += 2082;
        }

        $this->text = $text;

        return $this;
    }
934593
protected function onSetText(string $text): void
    {
        parent::onSetText($text);

        $this->isInvalid = false;
        $this->value = null;

        if ($this->hasError()) {
            return;
        }

        if ($this->isEmpty()) {
            return;
        }

        if (!preg_match('/^[-+]?[0-9]+$/', $text)) {
            $this->setError('Invalid value');
            $this->isInvalid = true;

            return;
        }

        $value = intval($text);

        if ($this->minimumValue !== null && $value < $this->minimumValue || $this->maximumValue !== null && $value > $this->maximumValue) {
            $this->setError('Invalid value');
            $this->isInvalid = true;

            return;
        }

        $this->value = $value;
    }
1121422
public function setDescription($text)
    {
        if (is_array($text)) {
            $text = implode("\n", $text);
        }
        $this->_description = $text;

        return $this;
    }
1146702
public function setTopic($text)
    {
        return $this->client->apiCall('channels.setTopic', [
            'channel' => $this->getId(),
            'topic' => $text,
        ])->then(function () use ($text) {
            $this->data['topic']['value'] = $text;
            return $text;
        });
    }
1295242
public function setSubText($text)
    {
        $this->subText = new Element('small');
        $this->subText->entity->setEntityName('sub-text');
        $this->subText->textContent->push($text);

        return $this;
    }
220685
public static function create(Text $text): self
    {
        $hint = new self();

        $hint->type = self::TYPE;
        $hint->hint = $text;

        return $hint;
    }
895829
public function setText(string $text): self
    {
        $text = trim($text);
        if ('' === $text) {
            throw new Exception('The text can not be empty');
        }

        $this->text = $text;

        return $this;
    }
1223995
public function addAfter(string $content, bool $text = true): self
    {
        $this->after[] = [
            'content' => $content,
            'text'    => $text
        ];

        return $this;
    }
243742
public function read(&$text)
    {
        /**
         * We could make a better effort at only finding @ between <?php ?>
         * but that's probably not necessary as @ doesn't occur much in the wild
         * and there's a significant performance gain by using str_replace().
         */

        // Replace \@ with \$
        $text = str_replace('\@', '\$', $text);

        // Now replace non-eescaped @'s
         $text = str_replace(array('@$'), '$', $text);

        // Replace \$ with @
        $text = str_replace('\$', '@', $text);

        return $this;
    }
1083206
public function out($text = '', $nl = true)
    {
        $this->output->out($text, $nl);

        return $this;
    }
892358
public function setHeader($text, $tagName = 'h1')
    {
        $this->header = new Element($tagName);
        $this->header->entity->setEntityName('header');
        $this->header->textContent->push($text);

        return $this;
    }
541092
public function purge($text)
    {
        foreach ($this->parsers as $parser) {
            $text = $parser->purge($text);
        }

        return $text;
    }
8848
private function initPayload($text)
    {
        $payload = new Payload();
        $payload->setOptions($this->getOptions());
        $payload->setQueryText($text);
        return $payload->createPayload();
    }
1007413
public function text($text) {

        if(false === is_string($text)) {
            return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($text)), E_USER_ERROR);
        }

    	$this -> text = $text;

    	return $this;
    }
616269
public function addText($text) {
		$content = new HtmlString();
		$content->htmlString = $text;
		$this->children[] = $content;
		return $this;
	}
162442
public function setParagraph($text)
    {
        $this->paragraph = new Paragraph();
        $this->paragraph->entity->setEntityName('paragraph');
        $this->paragraph->textContent->push($text);

        return $this;
    }
973870
public static function from(string $text): Range
    {
        $matches = [];
        preg_match(self::RANGE_PATTERN, $text, $matches);
        [$definition, $start, $end] = $matches;

        return new Range($definition, $start, $end);
    }