Your IP : 216.73.216.50


Current Path : /var/www/amortar/data/www/amg174.ru-copy/bitrix/modules/intec.seo/classes/text/
Upload File :
Current File : /var/www/amortar/data/www/amg174.ru-copy/bitrix/modules/intec.seo/classes/text/Generator.php

<?php
namespace intec\seo\text;

use intec\core\base\BaseObject;
use intec\core\helpers\Type;
use intec\seo\text\generator\Parser;
use intec\seo\text\generator\ParserException;

/**
 * Класс генератора текста.
 * Class Generator
 * @package intec\seo\text
 * @author apocalypsisdimon@gmail.com
 */
class Generator extends BaseObject implements GeneratorInterface
{
    /**
     * @inheritdoc
     * @param array $macros
     * @throws ParserException
     */
    public function process($text, $macros = [])
    {
        if (!Type::isArray($macros))
            $macros = [];

        return Parser::process($text)->transform($macros);
    }
}