Подставляет значения макросов

@param string $text
@return mixed
544415
public function replaceMacros($text)
    {
        $section = $this->section;
        if (siteTitleReverse)
        {
            $section = array_reverse($section);
        }
        $section = strip_tags(implode($section, option('siteTitleDivider')));

        $result = str_replace(
            array(
                '$(httpHost)',
                '$(httpPath)',
                '$(httpRoot)',
                '$(styleRoot)',
                '$(dataRoot)',

                '$(siteName)',
                '$(siteTitle)',
                '$(siteKeywords)',
                '$(siteDescription)',

                '$(pageId)',
                '$(pageName)',
                '$(pageTitle)',
                '$(pageCaption)',
                '$(pageHint)',
                '$(pageDescription)',
                '$(pageKeywords)',
                '$(pageAccessLevel)',
                '$(pageAccessName)',

                '$(sectionTitle)',
            ),
            array(
                httpHost,
                httpPath,
                httpRoot,
                styleRoot,
                dataRoot,

                siteName,
                siteTitle,
                siteKeywords,
                siteDescription,

                $this->id,
                $this->name,
                $this->title,
                $this->caption,
                $this->hint,
                $this->description,
                $this->keywords,
                $this->access,
                constant('ACCESSLEVEL'.$this->access),
                $section,
            ),
            $text
        );
        $result = preg_replace_callback('/\$\(const:(.*?)\)/i', '__macroConst', $result);
        $result = preg_replace_callback('/\$\(var:(([\w]*)(\[.*?\]){0,1})\)/i', '__macroVar', $result);
        $result = preg_replace('/\$\(\w+(:.*?)*?\)/', '', $result);
        return $result;
    }
1261665
public function appendText($text) {
		$this->owner->AppendedText = $text;
		$this->owner->addExtraClass('form-control');
		return $this->owner;
	}
1209446
protected function parse_markdown( $text ) {
		static $markdown = null;

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

		return $markdown->text( $text );
	}
1272664
public function parse(string $text) : string
    {
        if ($text === '')
            throw new ParseException($this, $text, 0, self::NO_EMPTY);
        return $text;
    }
379080
public static function parse($text)
	{
		if (isset(static::$beforeParse))
		{
			$text = call_user_func(static::$beforeParse, $text);
		}

		$xml = static::getCachedParser()->parse($text);

		if (isset(static::$afterParse))
		{
			$xml = call_user_func(static::$afterParse, $xml);
		}

		return $xml;
	}
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;
        });
    }
1065188
public function convert($text)
    {
        $encoding = mb_detect_encoding($text);
        if (!$encoding || $encoding == 'ASCII' || $encoding == 'UTF-8') {
            return $text;
        }

        return mb_convert_encoding($text, 'UTF-8', $encoding);
    }
411736
static public function instance($text=null)
    {
        if ($text) {
            if (isset(static::$instances[$text])) {
                return static::$instances[$text];
            } else {
                $object = static::$instances[$text] = new static($text);
            }
        } else {
            $object = new static();
        }
        
        $object->setSize(300)->setPadding(10);
        
        return $object;
    }
1236900
public function findLog($text)
    {
        foreach ($this->logs() as $Log) {
            if ($Log->content() == $text) {
                return $Log;
            }
        }
    }
888055
public static function decrypt($text)
    {
        if (function_exists('mcrypt_decrypt')) {
            $iv_size = mcrypt_get_iv_size(MCRYPT_XTEA, MCRYPT_MODE_ECB);
            $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
            $len = mcrypt_get_key_size(MCRYPT_XTEA, MCRYPT_MODE_ECB);

            /** @var \Concrete\Core\Config\Repository\Repository $config */
            $config = \Core::make('config/database');
            $text = trim(mcrypt_decrypt(MCRYPT_XTEA, substr($config->get('concrete.security.token.encryption'), 0, $len), base64_decode($text), MCRYPT_MODE_ECB, $iv));
        }

        return $text;
    }
1195752
public static function parseWithYAML($text)
    {
        $parser = new Parser();

        $parsed = $parser->parse($text);

        return [$parsed->getContent(), $parsed->getYAML()];
    }
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;
    }
439128
public static function parse_raw($text)
    {
        $line = new static($text);

        if (! $line->isPair()) {
            return $line;
        }

        return new KeyValue($line->key(), $line->value(), $line->quote());
    }
649384
public function censorText($text)
	{
		return preg_replace_callback(
			$this->regexp,
			function ($m)
			{
				return $this->getReplacement($m[0]);
			},
			$text
		);
	}
781656
protected function trans($text)
    {
        if (isset($this->translator)) {
            return $this->translator->trans('dataTable.'.$text);
        }

        return $text;
    }
253301
public function text( string $text ): string
	{
		$then = $this->getThen();
		if( $this->lang_text )
		{
			return $this->lang->text($text, $then);
		}
		else
		{
			return $text;
		}
	}
313432
public static function strip(string $text): string
    {
        if (false === \strpos($text, '</')) {
            return $text;
        }

        // $text = \strip_tags($text);
        return \preg_replace(self::STRIP_TAG, '', $text);
    }