2018-03-23 00:34:16 +03:00
|
|
|
<?php
|
2018-03-14 19:57:53 +03:00
|
|
|
|
2019-08-02 00:17:23 +03:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2022-04-05 16:46:55 +03:00
|
|
|
/**
|
|
|
|
* Flextype - Hybrid Content Management System with the freedom of a headless CMS
|
|
|
|
* and with the full functionality of a traditional CMS!
|
|
|
|
*
|
|
|
|
* Copyright (c) Sergey Romanenko (https://awilum.github.io)
|
|
|
|
*
|
|
|
|
* Licensed under The MIT License.
|
|
|
|
*
|
|
|
|
* For full copyright and license information, please see the LICENSE
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
2018-03-09 13:11:52 +03:00
|
|
|
*/
|
2019-09-04 17:00:09 +03:00
|
|
|
|
2018-03-23 00:34:16 +03:00
|
|
|
namespace Flextype;
|
|
|
|
|
2019-08-02 00:17:23 +03:00
|
|
|
use function getcwd;
|
|
|
|
use function is_file;
|
|
|
|
use function str_replace;
|
2018-03-13 01:00:10 +03:00
|
|
|
|
2019-06-11 21:18:18 +03:00
|
|
|
/**
|
|
|
|
* Ensure vendor libraries exist
|
|
|
|
*/
|
2022-07-07 15:55:21 +03:00
|
|
|
! is_file($flextypeAutoload = str_replace(DIRECTORY_SEPARATOR, '/', getcwd()) . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> for flextype');
|
2018-03-09 13:11:52 +03:00
|
|
|
|
2019-06-11 21:18:18 +03:00
|
|
|
/**
|
|
|
|
* Register The Auto Loader
|
|
|
|
*
|
|
|
|
* Composer provides a convenient, automatically generated class loader for
|
|
|
|
* our application. We just need to utilize it! We'll simply require it
|
|
|
|
* into the script here so that we don't have to worry about manual
|
|
|
|
* loading any of our classes later on. It feels nice to relax.
|
|
|
|
* Register The Auto Loader
|
|
|
|
*/
|
2020-12-06 21:57:58 +03:00
|
|
|
$flextypeLoader = require_once $flextypeAutoload;
|
2018-03-09 13:11:52 +03:00
|
|
|
|
2019-06-11 21:18:18 +03:00
|
|
|
/**
|
|
|
|
* Bootstraps the Flextype
|
|
|
|
*
|
|
|
|
* This bootstraps the Flextype and gets it ready for use, then it
|
|
|
|
* will load up this application so that we can run it and send
|
|
|
|
* the responses back to the browser and delight our users.
|
|
|
|
*/
|
2021-08-10 11:09:37 +03:00
|
|
|
require_once __DIR__ . '/src/flextype/flextype.php';
|