Screen\Capture::getTemplateResult PHP Метод

getTemplateResult() приватный Метод

private getTemplateResult ( string $templateName, array $args ) : string
$templateName string
$args array
Результат string
    private function getTemplateResult($templateName, array $args)
    {
        $templatePath = $this->templatePath . DIRECTORY_SEPARATOR . $templateName . '.php';
        if (!file_exists($templatePath)) {
            throw new TemplateNotFoundException($templateName);
        }
        ob_start();
        extract($args);
        include $this->templatePath . DIRECTORY_SEPARATOR . $templateName . '.php';
        return ob_get_clean();
    }