Clickalicious\PhpMemAdmin\App::loadTemplates PHP Метод

loadTemplates() защищенный Метод

Loads a template from filesystem.
Автор: Benjamin Carl ([email protected])
protected loadTemplates ( string | array $templates ) : string
$templates string | array A single template as string or a collection as array
Результат string Content of template(s) as string
    protected function loadTemplates($templates)
    {
        if (is_array($templates) === false) {
            $templates = str_replace('/', DIRECTORY_SEPARATOR, $templates);
            $templates = str_replace('\\', DIRECTORY_SEPARATOR, $templates);
            $templates = array($templates);
        }
        $result = '';
        foreach ($templates as $template) {
            $result .= file_get_contents(CLICKALICIOUS_PHPMEMADMIN_BASE_PATH . 'app/templates/' . $template . '.tpl');
        }
        return $result;
    }