2019-01-07 13:24:29 +01:00
|
|
|
<?php
|
|
|
|
//Check if autoload has been already loaded (in case plugin installed in existing project)
|
2019-01-21 20:37:24 +01:00
|
|
|
$root = __DIR__;
|
2019-06-09 19:47:46 +02:00
|
|
|
if (!file_exists($root . '/vendor/autoload.php')) {
|
|
|
|
$root = __DIR__ . '/../../..';
|
2019-01-07 13:24:29 +01:00
|
|
|
}
|
2019-06-09 19:47:46 +02:00
|
|
|
require_once $root . '/vendor/autoload.php';
|
|
|
|
chdir($root);
|
|
|
|
|
2019-01-07 13:24:29 +01:00
|
|
|
//Check if root env file hash been loaded (in case plugin installed in existing project)
|
2019-06-20 18:51:58 +02:00
|
|
|
if (!getenv('SERVER_ADDRESS')) {
|
2019-12-31 23:44:44 +01:00
|
|
|
Dotenv\Dotenv::createImmutable($root)->load();
|
2019-01-07 13:24:29 +01:00
|
|
|
}
|