mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
Update bootstrap
This commit is contained in:
@@ -6,17 +6,23 @@
|
|||||||
/*
|
/*
|
||||||
* Smarty PHPUnit Bootstrap
|
* Smarty PHPUnit Bootstrap
|
||||||
*/
|
*/
|
||||||
// Locate SmartyBC class and load it
|
// Locate Autoloader or SmartyBC class and load it
|
||||||
if (is_file(__DIR__ . '/../smarty/libs/Autoloader.php')) {
|
if (is_file(__DIR__ . '/../smarty/libs/Autoloader.php')) {
|
||||||
require_once __DIR__ . '/../smarty/libs/Autoloader.php';
|
require_once __DIR__ . '/../smarty/libs/Autoloader.php';
|
||||||
|
Smarty_Autoloader::register(true);
|
||||||
} elseif (is_file(__DIR__ . '/../libs/Autoloader.php')) {
|
} elseif (is_file(__DIR__ . '/../libs/Autoloader.php')) {
|
||||||
require_once __DIR__ . '/../libs/Autoloader.php';
|
require_once __DIR__ . '/../libs/Autoloader.php';
|
||||||
|
Smarty_Autoloader::register(true);
|
||||||
|
} elseif (is_file(__DIR__ . '/../smarty/libs/SmartyBC.class.php')) {
|
||||||
|
require_once __DIR__ . '/../smarty/libs/SmartyBC.class.php';
|
||||||
|
} elseif (is_file(__DIR__ . '/../libs/SmartyBC.class.php')) {
|
||||||
|
require_once __DIR__ . '/../libs/SmartyBC.class.php';
|
||||||
} else {
|
} else {
|
||||||
throw new Exception('can not locate Smarty distribution');
|
throw new Exception('can not locate Smarty distribution');
|
||||||
}
|
}
|
||||||
Smarty_Autoloader::register(true);
|
|
||||||
if (!defined('SMARTY_COMPOSER_INSTALL')) {
|
if (!defined('SMARTY_COMPOSER_INSTALL')) {
|
||||||
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
|
foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php',
|
||||||
|
__DIR__ . '/vendor/autoload.php') as $file) {
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
define('SMARTY_COMPOSER_INSTALL', $file);
|
define('SMARTY_COMPOSER_INSTALL', $file);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user