Add some plain text

This is a helper to add a content item just via a string and
it generates and adds a \ContentItem object to its collection.

@param string $text
332447
public function addText(string $text)
    {
        $contentConfig = [
            'text' => $text
        ];

        $contentItem = new ContentItem($contentConfig);

        $this->contentItems->addContentItemToCollection($contentItem);
    }
122034
public function setText(string $text)
    {
        $this
            ->getLexer()
            ->setText($text);
        $this->locator = null;
        return $this;
    }
513255
public function asText($text)
    {
        $stream = StreamFactory::string($text);
        return new Response($stream, self::OK, ['Content-Type' => 'text/plain']);
    }
1151319
public function setText($text = null)
    {
        $text = trim($text);
        $this->text = 0 < strlen($text) ? $text : null;

        return $this;
    }
616269
public function addText($text) {
		$content = new HtmlString();
		$content->htmlString = $text;
		$this->children[] = $content;
		return $this;
	}
853554
public function add($text, $value){
		$this->select[] = array($text, $value);
		$this->validator->addPossibility($value);
	}
631447
public function loadModelFromText($text)
    {
        $cfg = Config::newConfigFromText($text);

        $this->loadSection($cfg, 'r');
        $this->loadSection($cfg, 'p');
        $this->loadSection($cfg, 'e');
        $this->loadSection($cfg, 'm');

        $this->loadSection($cfg, 'g');
    }
539855
public function add($text, $value){
		$this->radios[] = array($text, $value);
		$this->validator->addPossibility($value);
	}
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;
    }
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;
    }
1291230
public function text($text = '')
    {
        $msg = array(
            'ToUserName'   => $this->getRevFrom(),
            'FromUserName' => $this->getRevTo(),
            'MsgType'      => self::MSGTYPE_TEXT,
            'Content'      => $this->_auto_text_filter($text),
            'CreateTime'   => time(),
        );
        $this->Message($msg);
        return $this;
    }
660060
public function setEmptyText($text = null)
    {
        $this->empty_text = $text === null ? $this->default_empty_text : $text;

        return $this;
    }
717339
public function addText($text, $styleFont = null, $styleParagraph = null) {
		$text = new PHPWord_Section_Text($text, $styleFont, $styleParagraph);
		$this->_elementCollection[] = $text;
		return $text;
	}
566702
private function addTextToImage($text, $x, $y)
    {
        imagettftext($this->image, $this->get('font_size'), 0, $x, $y, $this->get('text_color'), $this->dir.'/instruction.ttf', $text);
    }
542611
protected function frame($text)
    {
        $line   = '+'.str_repeat('-', strlen($text) + 4).'+';
        $this->info($line);
        $this->info("|  $text  |");
        $this->info($line);
    }
871969
public void setText (String text) {
		if (content instanceof VisLabel) {
			((VisLabel) content).setText(text);
		} else {
			setContent(new VisLabel(text));
		}
		pack();
	}
673368
public AnnotatedTextBuilder addText(String text) {
    parts.add(new TextPart(text, TextPart.Type.TEXT));
    return this;
  }