1
0
mirror of https://github.com/flextype/flextype.git synced 2025-01-17 12:48:31 +01:00
php-flextype/index.php

29 lines
816 B
PHP
Raw Normal View History

2018-03-23 00:34:16 +03:00
<?php
2018-03-14 19:57:53 +03:00
2018-03-09 13:11:52 +03:00
/**
2018-03-21 00:25:34 +03:00
* @package Flextype
2018-03-09 13:11:52 +03:00
*
2018-03-14 19:57:53 +03:00
* @author Sergey Romanenko <awilum@yandex.ru>
2018-03-21 00:25:34 +03:00
* @link http://flextype.org
2018-03-09 13:11:52 +03:00
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2018-03-23 00:34:16 +03:00
namespace Flextype;
// Define the application minimum supported PHP version.
2018-03-21 00:28:34 +03:00
define('FLEXTYPE_MINIMUM_PHP', '7.1.3');
2018-03-09 19:49:27 +03:00
// Check PHP Version
2018-03-21 00:28:34 +03:00
version_compare($ver = PHP_VERSION, $req = FLEXTYPE_MINIMUM_PHP, '<') and exit(sprintf('You are running PHP %s, but Flextype needs at least <strong>PHP %s</strong> to run.', $ver, $req));
2018-03-09 13:11:52 +03:00
2018-03-25 16:50:32 +03:00
// Ensure vendor libraries exist
2018-03-09 19:49:27 +03:00
!is_file($autoload = __DIR__ . '/vendor/autoload.php') and exit("Please run: <i>composer install</i>");
2018-03-09 13:11:52 +03:00
2018-03-25 16:50:32 +03:00
// Register The Auto Loader
2018-03-09 13:11:52 +03:00
$loader = require_once $autoload;
2018-03-25 16:50:32 +03:00
// Init Flextype
2018-04-08 00:27:54 +03:00
Flextype::instance();