A super easy PHP Framework for web development! https://github.com/exacti/phacil-framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.3 KiB

<?php
namespace {
$preferenceDIObj = \Phacil\Framework\templateEngines\Twig\Api\Extension\TranslateInterface::class;
if (version_compare(phpversion(), '7.2.5', '>') == false) {
define('TwigFolderLoad', 'Twig1x');
define('TwigLoaderFilesystem', 'Twig_Loader_Filesystem');
define('TwigEnvironment', 'Twig_Environment');
define('TwigSimpleFilter', 'Twig_SimpleFilter');
define('TwigExtensionDebug', 'Twig_Extension_Debug');
if(!\Phacil\Framework\Registry::checkPreferenceExist($preferenceDIObj)){
\Phacil\Framework\Registry::addDIPreference($preferenceDIObj, \Phacil\Framework\templateEngines\Twig\Extension\Legacy\Translate::class);
}
} else {
define('TwigLoaderFilesystem', '\Twig\Loader\FilesystemLoader');
define('TwigEnvironment', '\Twig\Environment');
define('TwigSimpleFilter', '\Twig\TwigFilter');
define('TwigExtensionDebug', '\Twig\Extension\DebugExtension');
if (!\Phacil\Framework\Registry::checkPreferenceExist($preferenceDIObj)) {
\Phacil\Framework\Registry::addDIPreference($preferenceDIObj, 'Phacil\Framework\templateEngines\Twig\Extension\Translate');
}
}
if(defined('TwigFolderLoad')){
include_once TwigFolderLoad."/vendor/autoload.php";
}
}