bakaphp /
phalcon-api
| 1 | <?php |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Gewaer\Providers; |
||
| 6 | |||
| 7 | use function Gewaer\Core\appPath; |
||
| 8 | use Phalcon\DiInterface; |
||
| 9 | use Phalcon\Di\ServiceProviderInterface; |
||
| 10 | use Phalcon\Config; |
||
| 11 | |||
| 12 | class ConfigProvider implements ServiceProviderInterface |
||
| 13 | {
|
||
| 14 | /** |
||
| 15 | * @param DiInterface $container |
||
| 16 | */ |
||
| 17 | public function register(DiInterface $container) |
||
| 18 | {
|
||
| 19 | $container->setShared( |
||
| 20 | 'config', |
||
| 21 | function () {
|
||
| 22 | $data = require appPath('library/Core/config.php');
|
||
| 23 | |||
| 24 | return new Config($data); |
||
| 25 | } |
||
| 26 | ); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |