generated from phel-lang/phel-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gacela-local.php
27 lines (23 loc) · 1012 Bytes
/
gacela-local.php
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
<?php
declare(strict_types = 1);
use Gacela\Framework\Bootstrap\GacelaConfig;
use Gacela\Framework\Event\GacelaEventInterface;
use Phel\Compiler\CompilerFacadeInterface;
/**
* This file is totally optional.
* This is here just as a demonstration of overriding/combining the gacela config from phel-lang itself.
* Full docs: https://gacela-project.com/docs/bootstrap/#different-environments
*
* You can run this configuration using `APP_ENV=local`
* For example: `APP_ENV=local composer play`
*/
return static function (GacelaConfig $config): void {
// Registering a generic listener to know what's happening internally in Gacela
$config->registerGenericListener(static function (GacelaEventInterface $event): void {
echo $event->toString() . PHP_EOL;
});
// Hook into a service to be able to extend it however you want
$config->extendService('FACADE_COMPILER', function (CompilerFacadeInterface $compilerFacade): void {
dump(get_class($compilerFacade));
});
};