mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-29 13:51:37 +08:00
24 lines
416 B
PHP
24 lines
416 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Phalcon\Config as PhalconConfig;
|
|
|
|
class Config extends AbstractProvider
|
|
{
|
|
|
|
protected $serviceName = 'config';
|
|
|
|
public function register()
|
|
{
|
|
$this->di->setShared($this->serviceName, function () {
|
|
|
|
$options = require config_path() . '/config.php';
|
|
|
|
$config = new PhalconConfig($options);
|
|
|
|
return $config;
|
|
});
|
|
}
|
|
|
|
} |