PHP Classes

File: Logaty/Helpers/Switcher/ImportTemplate.php

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP Multilingual Support Library   Logaty/Helpers/Switcher/ImportTemplate.php   Download  
File: Logaty/Helpers/Switcher/ImportTemplate.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Multilingual Support Library
Translate texts for Web sites from JSON or DB
Author: By
Last change:
Date: 3 years ago
Size: 340 bytes
 

Contents

Class file image Download
<?php

namespace PHPtricks\Logaty\Helpers\Switcher;

trait
ImportTemplate
{
    protected function
render($template, $id)
    {
       
$separator = DIRECTORY_SEPARATOR;
       
$path = logaty()->rootDir() . "assets{$separator}switch-templates{$separator}{$template}.php";

        if (
file_exists($path))
            include
$path;
    }
}