-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathplugins.php
More file actions
31 lines (25 loc) · 919 Bytes
/
plugins.php
File metadata and controls
31 lines (25 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* Register CORE
*/
// Register core service provider
$app->register(new Marvin\Marvin\Provider\InstallServiceProvider());
// Require core middlewares
require __DIR__ .'/middlewares.php';
// Mount core controller provider
$app->mount('/admin', new Marvin\Marvin\Controller\AdminControllerProvider());
$app->mount('/install', new Marvin\Marvin\Controller\InstallControllerProvider());
/**
* Register PLUGINS
*/
foreach ($app['config']['plugins'] as $plugin) {
if (file_exists($file = __DIR__ .'/../'. $plugin .'/bootstrap.php')) {
require $file;
} elseif (file_exists($file = $config['app_dir'] .'/'. $plugin .'/bootstrap.php')) {
require $file;
} elseif (file_exists($file = __DIR__ .'/vendor/marvin/'. $plugin .'/bootstrap.php')) {
require $file;
} elseif (file_exists($file = __DIR__ .'/../../../../marvin-'. $plugin .'/bootstrap.php')) {
require $file;
}
}