Render the module chrome

@param string $text Block of text to parse
@return $this
171570
public function filter(&$text)
    {
        $data = (object) $this->getTemplate()->getData();

        if (isset($data->styles))
        {
            foreach($data->styles as $style)
            {
                $method = 'modChrome_'.$style;

                // Apply chrome and render module
                if (function_exists($method))
                {
                    $data->module->style   = implode(' ', $data->styles);
                    $data->module->content = $text;

                    ob_start();
                    $method($data->module, $data->module->params, $data->attribs);
                    $data->module->content = ob_get_contents();
                    ob_end_clean();
                }

                $text = $data->module->content;
            }
        }

        return $this;
    }
371923
public function setText($text)
    {
        $this->template->trySet('Content', $this->app->_($text));

        return $this;
    }
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;
    }
1120753
private function applyCurrentStyle($text) {
        return $this->isDecorated() && strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text;
    }
660595
public function body($text)
    {
        try {
            $this->mailer->MsgHTML($text);
        } catch (phpmailerException $e) {
            throw new EmailException($e->getMessage(), $e->getCode());
        }

        return $this;
    }
1253889
public function send(?string $text = null): self
    {
        if ($text) {
            $this->setText($text);
        }

        $this->client->sendMessage($this);

        return $this;
    }
1146713
public function asHtml($text)
    {
        $stream = StreamFactory::string($text);
        return new Response($stream, self::OK, ['Content-Type' => 'text/html']);
    }
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;
    }
1214691
public function render(string $text): void
    {
        if ($this->overwrite) {
            if (!$this->firstRun) {

                // \x0D - Move the cursor to the beginning of the line
                // \x1B[2K - Erase the line
                $this->output->write("\x0D\x1B[2K", false);
                $this->output->write($text, false);
            }
        } elseif ($this->step > 0) {
            $this->output->write('');
        }

        $this->firstRun = false;
    }
506923
public function url($text)
    {
        return preg_replace_callback($this->pattern['url'], function ($matches) {
            return $this->Html->link($matches[2], $matches[1]);
        }, $text);
    }
889045
private function set_text($text)
    {
        if(!!$text)
        {
            if(!!$this->text)
            {
                if(!!is_array($this->text))
                {
                    $this->text[] = $text;
                }
                else
                {
                    $this->text = array($this->text,$text);
                }
            }
            else
            {
                $this->text = $text;
            }
        }

        return $this;
    }
1294797
public function apply($text)
    {
        $foreground = null;
        $background = null;

        if($this->foreground)
            $foreground = 'color: ' . $this->foreground . ';';

        if($this->background)
            $background = 'background: ' . $this->background . ';';

        $dom = '<span style="'.$foreground.$background.'">' . $text . '</span>';

        return $dom;
    }
893828
protected function _processText($text)
    {
        $matches = array();

        preg_match_all("/(href|src)=\"(?!http|ftp|https|mailto|data)([^\"]*)\"/", $text, $matches, PREG_SET_ORDER);

        foreach ($matches as $match)
        {
            $route = $this->getObject('lib:dispatcher.router.route', array(
                'url'    => $match[2],
                'escape' => false
            ));

            //Add the host and the schema
            $route->scheme = $this->getUrl()->scheme;
            $route->host   = $this->getUrl()->host;

            $text = str_replace($match[0], $match[1].'="'.$route.'"', $text);
        }

        return $text;
    }
1209446
protected function parse_markdown( $text ) {
		static $markdown = null;

		if ( null === $markdown ) {
			$markdown = new Parsedown();
		}

		return $markdown->text( $text );
	}
789583
public function parse($text) {
      $this->queue = array();
      $this->parser = xml_parser_create();        
      $this->parsed = 0;     
      $this->opened = 0;
      xml_set_object($this->parser, $this);
      xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
      xml_parser_set_option($this->parser, XML_OPTION_SKIP_WHITE, 1);
      $code = xml_parse_into_struct($this->parser, $text, $vals, $index); 
      /**
       * Parse into bAML
       * type structure
       * 
       */ 
      if ($code != 0) {
        return XMLUtility::Make($this, $vals); 
      }
        
      throw new \CatapultApiException("Provided text was not valid XMLUtility..");
    }
487534
public function send($text = null)
    {
        if ($text) {
            $this->withText($text);
        }

        $this->response = $this->client->sendMessage($this);

        return $this;
    }
156862
public function seeInPopup($text)
    {
        if ($this->isPhantom()) {
            throw new ModuleException($this, 'PhantomJS does not support working with popups');
        }
        $alert = $this->webDriver->switchTo()->alert();
        try {
            $this->assertStringContainsString($text, $alert->getText());
        } catch (\PHPUnit\Framework\AssertionFailedError $e) {
            $alert->dismiss();
            throw $e;
        }
    }