mirror of
https://github.com/flextype/flextype.git
synced 2025-08-06 21:26:48 +02:00
feat(core): add ability to execute specific project related code
- after-plugins to bootstrap file before plugins intialization. - after-plugins to bootstrap file after plugins intialization.
This commit is contained in:
7
src/flextype/bootstrap/after-plugins.php
Normal file
7
src/flextype/bootstrap/after-plugins.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if (filesystem()->file(PATH_PROJECT . '/bootstrap/after-plugins.php')->exists()) {
|
||||
require_once PATH_PROJECT . '/bootstrap/after-plugins.php';
|
||||
}
|
7
src/flextype/bootstrap/before-plugins.php
Normal file
7
src/flextype/bootstrap/before-plugins.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if (filesystem()->file(PATH_PROJECT . '/bootstrap/before-plugins.php')->exists()) {
|
||||
require_once PATH_PROJECT . '/bootstrap/before-plugins.php';
|
||||
}
|
@@ -376,10 +376,16 @@ if (in_array(registry()->get('flextype.settings.timezone'), DateTimeZone::listId
|
||||
View::setDirectory(PATH_PROJECT);
|
||||
View::setExtension(registry()->get('flextype.settings.view.extension'));
|
||||
|
||||
// Add bootstrap file before plugins intialization.
|
||||
require_once ROOT_DIR . '/src/flextype/bootstrap/before-plugins.php';
|
||||
|
||||
// Add Plugins Service
|
||||
container()->set('plugins', new Plugins());
|
||||
|
||||
// Add Routes
|
||||
// Add bootstrap file before plugins intialization.
|
||||
require_once ROOT_DIR . '/src/flextype/bootstrap/after-plugins.php';
|
||||
|
||||
// Add Routes file.
|
||||
require_once ROOT_DIR . '/src/flextype/routes/routes.php';
|
||||
|
||||
// Enable lazy CORS
|
||||
|
Reference in New Issue
Block a user