2016-07-28 22:47:47 +02:00
|
|
|
<?php
|
|
|
|
|
2016-07-29 08:55:08 +02:00
|
|
|
// Loaded as a dependency
|
|
|
|
if (file_exists(__DIR__ . '/../../../autoload.php')) {
|
|
|
|
return require_once __DIR__ . '/../../../autoload.php';
|
|
|
|
}
|
|
|
|
|
2016-07-28 22:47:47 +02:00
|
|
|
// Loaded in the project itself
|
|
|
|
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
|
2016-07-28 22:48:50 +02:00
|
|
|
return require_once __DIR__ . '/../vendor/autoload.php';
|
2016-07-28 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// Loaded in the project itself, when vendor isn't installed
|
|
|
|
if (file_exists(__DIR__ . '/../daux.phar')) {
|
|
|
|
define('PHAR_DIR', __DIR__ . '/..');
|
2016-07-28 22:48:50 +02:00
|
|
|
|
|
|
|
return require_once 'phar://' . __DIR__ . '/../daux.phar/vendor/autoload.php';
|
2016-07-28 22:47:47 +02:00
|
|
|
}
|
|
|
|
|
2016-07-28 22:48:50 +02:00
|
|
|
throw new Exception('Impossible to load Daux, missing vendor/ or daux.phar');
|