1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-22 04:42:57 +02:00

refactor(core): code updates and improvements - doctrine

This commit is contained in:
Awilum
2022-07-07 15:55:21 +03:00
parent 5a344b6c52
commit eeb0875a1a
11 changed files with 42 additions and 32 deletions

View File

@@ -15,20 +15,10 @@
namespace Flextype;
/**
* Define the Flextype start time in current unix timestamp (microseconds).
*/
define('FLEXTYPE_START_TIME', microtime(true));
/**
* Define the PATH to the root directory (without trailing slash).
*/
define('FLEXTYPE_ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd()));
/**
* Ensure vendor libraries exist
*/
! is_file($flextypeAutoload = FLEXTYPE_ROOT_DIR . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> for flextype');
! is_file($flextypeAutoload = str_replace(DIRECTORY_SEPARATOR, '/', getcwd()) . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> for flextype');
/**
* Register The Auto Loader
@@ -49,4 +39,4 @@ $flextypeLoader = require_once $flextypeAutoload;
* the responses back to the browser and delight our users.
*/
require_once FLEXTYPE_ROOT_DIR . '/src/flextype/flextype.php';
require_once rtrim(__DIR__, '/bin') . '/src/flextype/flextype.php';