tapestry-cloud/tapestry

View on GitHub
src/bootstrap.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

if (! defined('TAPESTRY_START')) {
    define('TAPESTRY_START', microtime(true));
}

if (version_compare(phpversion(), '5.4', '<')) {
    die('You must use PHP >= 5.4 in order to use Tapestry. Please upgrade your PHP version.');
}
if (! ini_get('date.timezone')) {
    date_default_timezone_set('UTC');
}

setlocale(LC_ALL, 'en_US.UTF8');

// Phar includes
if (isset($include)) {
    require_once $include.'/vendor/autoload.php';
} elseif (file_exists(__DIR__.'/../vendor/autoload.php')) {
    require_once __DIR__.'/../vendor/autoload.php';
} elseif (file_exists(__DIR__.'/../../../autoload.php')) {
    require_once __DIR__.'/../../../autoload.php';
} else {
    echo 'Please run composer install.'.PHP_EOL;
    exit(1);
}