Configures the #CDATA of an element.

@param Project $project the project this element belongs to
@param object  the element to configure
@param string $text the element's #CDATA
1479
public static function addText($project, $target, $text = null)
    {
        if ($text === null || strlen(trim($text)) === 0) {
            return;
        }
        $ih = IntrospectionHelper::getHelper(get_class($target));
        $text = $project->replaceProperties($text);
        $ih->addText($project, $target, $text);
    }
1067513
public function msgText($text)
    {
        $this->isHTML(false);
        $text = self::html2text($text, true);
        $text = self::normalizeBreaks($text);
        $this->Body = $text;
    }
124452
public function writeAt($text, $x, $y, $color = null, $bgColor = null)
    {
        $this->adapter->writeAt($text, $x, $y, $color, $bgColor);
    }
765803
public function addNext($text, $template = null)
    {
        if(!empty($text))
        {
            $this->callToActions = ['message' => ['text' => $text]];
        }
        
        if(!empty($template))
        {
            if($template instanceof StructuredMessage)
            {
                $this->callToActions = ['message' => [$template->getDataForCall(FALSE)]];
            }
            else
            {
                throw new MessengerPlatformException('Template for welcome message is not StructuredMessage.', 4);
            }
        }
    }
972795
public function sendText($text)
    {
        $cmd = implode(' ', array('SEND', 'TEXT', '"' . $text . '"'));
        $result = $this->send($cmd);
        if ($result->isResult(-1)) {
            throw new PAGIException('Command failed');
        }
    }
140656
@Override
  public void setProject(final Project project) {
    super.setProject(project);
    this.compilerDef.setProject(project);
    this.linkerDef.setProject(project);
  }
736151
public function commentOnProject($projectId = null, $text = "")
    {
        $projectId = $projectId ?: $this->defaultProjectId;

        $data = [
            "text" => $text
        ];

        return $this->curl->post("projects/{$projectId}/stories", ['data' => $data]);
    }
196790
public function cData($text)
    {
        $this->writer->writeCData($text);
        $this->writer->text("\n");
        return $this;
    }
800342
protected function error($text)
    {
        if($this->console) {
            $this->console->error($text);
        }

        if($this->logger) {
            $this->logger->error($text);
        }
    }
1294792
public function linkPlainTag($text, &$data, &$root)
    {
        $explode = preg_split('/[ \t]+/', $text);
        $link = array_shift($explode);
        if ($link) {
            $this->_link = $link;
            $text = join(' ', $explode);
        } else {
            $this->_link = NULL;
        }
        parent::tag('@linkplain', $text, $root);
    }
1332126
public function setText($text)
    {
        if (!is_string($text)) {
            throw new InvalidArgumentException('string', 0);
        }

        $text = trim($text);

        if (strpos($text, '#') !== 0) {
            $text = '# ' . $text;
        }

        $this->text = $text;

        return $this;
    }
347585
public function execute(ProjectDescriptor $project)
    {
        Dispatcher::getInstance()->dispatch(
            self::EVENT_PRE_TRANSFORM,
            PreTransformEvent::createInstance($this)->setProject($project)
        );

        $transformations = $this->getTemplates()->getTransformations();
        $this->initializeWriters($project, $transformations);
        $this->transformProject($project, $transformations);

        Dispatcher::getInstance()->dispatch(self::EVENT_POST_TRANSFORM, PostTransformEvent::createInstance($this));

        $this->log('Finished transformation process');
    }
56963
public function setText(string $text): void
    {
        $this->text = $text;

        if ( ! is_null($this->encode)) {
            $text = $this->encode->convert($text);

            // remember the conversion
            $this->convertedText = $text;
        }
    }
14750
public function setBody($text)
    {
        if (is_string($text)) {
            $this->lines = explode("\n", $text);
        } elseif (is_array($text)) {
            $this->lines = $text;
        } else {
            throw new InvalidArgumentTypeException('Invalid body type', $text, array('string', 'array'));
        }
    }
846211
public function setTextBody($text) {
    if (!is_string($text)) {
      $error = sprintf("Plain text given is not a string (Actual type: %s).",
                       gettype($text));
      throw new \InvalidArgumentException($error);
    }
    $this->message->setTextbody($text);
  }
1119021
public function setText($text) {
		if( !is_string($text) ) {
			throw new \Exception('RequireStringParameter');
		}
		$this->setTEXTBody(strip_tags($text));
		$this->setHTMLBody(nl2br($text));
	}
1121572
private function buildNamespaces(Project $project): void
    {
        foreach ($project->getFiles() as $file) {
            foreach ($file->getNamespaces() as $namespaceFqsen) {
                $namespace = $this->getNamespaceByName($project, (string) $namespaceFqsen);
                $this->buildNamespace($file, $namespace);
            }
        }
    }