bakaphp /
phalcon-api
| 1 | <?php |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 2 | |||
| 3 | use Dotenv\Dotenv; |
||
| 4 | use Phalcon\Loader; |
||
| 5 | use function Gewaer\Core\appPath; |
||
| 6 | |||
| 7 | // Register the auto loader |
||
| 8 | require __DIR__ . '/functions.php'; |
||
| 9 | |||
| 10 | $loader = new Loader(); |
||
| 11 | $namespaces = [ |
||
| 12 | 'Niden' => appPath('/library'),
|
||
| 13 | 'Gewaer' => appPath('/library'),
|
||
| 14 | 'Gewaer\Api\Controllers' => appPath('/api/controllers'),
|
||
| 15 | 'Gewaer\Cli\Tasks' => appPath('/cli/tasks'),
|
||
| 16 | 'Niden\Tests' => appPath('/tests'),
|
||
| 17 | 'Gewaer\Tests' => appPath('/tests'),
|
||
| 18 | ]; |
||
| 19 | |||
| 20 | $loader->registerNamespaces($namespaces); |
||
| 21 | |||
| 22 | $loader->register(); |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Composer Autoloader |
||
| 26 | */ |
||
| 27 | require appPath('/vendor/autoload.php');
|
||
| 28 | |||
| 29 | // Load environment |
||
| 30 | (new Dotenv(appPath()))->overload(); |
||
| 31 |