Sets the group's purpose text.

@param string $text The new purpose text to set to.

@return \React\Promise\PromiseInterface
487481
public function setPurpose($text)
    {
        return $this->client->apiCall('groups.setPurpose', [
            'channel' => $this->getId(),
            'purpose' => $text,
        ])->then(function () use ($text) {
            $this->data['purpose']['value'] = $text;
            return $text;
        });
    }
981330
public function filter(&$text)
    {
        //$this->_addMetatag($text);
        $this->_addAction($text);
        $this->_addToken($text);
        $this->_addQueryParameters($text);

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

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

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

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

        try {
            $this->setValue(new \DateTimeImmutable($text));
        } catch (\Exception $exception) {
            $this->setError('Invalid value');
            $this->isInvalid = true;
        }
    }
616269
public function addText($text) {
		$content = new HtmlString();
		$content->htmlString = $text;
		$this->children[] = $content;
		return $this;
	}
593237
public function write(&$text)
    {
        $text = str_replace(
            array_keys($this->_alias_write),
            array_values($this->_alias_write),
            $text);

        return $this;
    }
741407
public function setText($text)
	{
		if ( ! is_string($text)) {
			throw new \InvalidArgumentException(
				__METHOD__."() expects parameter one, text, to be a string"
			);
		}
		
		$this->text = $text;
		
		return $this;
	}
796574
public function from(Text $text)
    {
        $lines = $text->getLines();
        $lineBreak = $text->getLineBreak();
        $content = implode($lineBreak, $lines);
        $rawTokens = token_get_all($content);

        return $this->tokenBuilder->buildFromRaw($rawTokens);
    }
841591
public function addText($text)
    {
        $currentDescription = $this->project->getDescription();
        if ($currentDescription === null) {
            $this->project->setDescription($text);
        } else {
            $this->project->setDescription($currentDescription . $text);
        }
    }
1080856
public function quoteIdentifier($text)
    {
        if ($this->getTable()->isIdentifierQuotingEnabled()) {
            return $this->getPlatform()->doQuoting($text);
        }

        return $text;
    }
925955
public function read(&$text)
    {
        $text = str_replace(
            array_keys($this->_alias_read),
            array_values($this->_alias_read),
            $text);

        return $this;
    }
956317
public function setHtmlBody($text) {
    if (!is_string($text)) {
      $error = sprintf("HTML text given is not a string (Actual type: %s).",
                       gettype($text));
      throw new \InvalidArgumentException($error);
    }
    $this->message->setHtmlbody($text);
  }
174979
public function setContent( $text )
	{
		if ( $text == $this->getContent() ) { return; }

		@ini_set( 'mbstring.substitute_character', 'none' );
		$this->_values['content'] = @mb_convert_encoding( (string) $text, 'UTF-8', 'UTF-8' );
		$this->setModified();
	}
1087549
public function setEpilog($text)
    {
        if (is_array($text)) {
            $text = implode("\n", $text);
        }
        $this->_epilog = $text;

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

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

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

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

        $this->value = Url::tryParse($text);

        if ($this->value === null) {
            $this->setError('Invalid value');
            $this->isInvalid = true;
        }
    }
1089580
public function replace($text)
    {
        preg_match_all($this->pattern, $text, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
        $delta = 0;
        foreach ($matches as $match)
        {
            $stringsOnly = array();
            foreach ($match as $info)
            {
                $stringsOnly []= $info[0];
            }
            $replace = call_user_func($this->callback, $stringsOnly);
            if (false === $replace || null === $replace)
            {
                continue;
            }

            $text = substr_replace($text, $replace, $match[0][1] + $delta, strlen($match[0][0]));
            $delta += strlen($replace) - strlen($match[0][0]);
        }

        return $text;
    }
1327073
public function setText($text, $finalize = true)
    {
        if ($finalize && !$this->isFinalized()) {
            $this->finalize();
        }

        $this->append($text);
        return $this;
    }
1236191
public function setText($text, $markdown = true)
    {
        $this->data['text'] = $text;
        $this->data['mrkdwn'] = $markdown;
        return $this;
    }