mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-21 19:22:45 +08:00
40 lines
955 B
PHP
40 lines
955 B
PHP
<?php
|
|
/**
|
|
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
|
|
* @license https://opensource.org/licenses/GPL-2.0
|
|
* @link https://www.koogua.com
|
|
*/
|
|
|
|
namespace App\Http\Admin;
|
|
|
|
use App\Library\Mvc\View as MyView;
|
|
use App\Services\Auth\Admin as AdminAuth;
|
|
use Phalcon\DiInterface;
|
|
use Phalcon\Mvc\ModuleDefinitionInterface;
|
|
|
|
class Module implements ModuleDefinitionInterface
|
|
{
|
|
|
|
public function registerAutoLoaders(DiInterface $dependencyInjector = null)
|
|
{
|
|
|
|
}
|
|
|
|
public function registerServices(DiInterface $dependencyInjector)
|
|
{
|
|
$dependencyInjector->setShared('view', function () {
|
|
$view = new MyView();
|
|
$view->setViewsDir(__DIR__ . '/Views');
|
|
$view->registerEngines([
|
|
'.volt' => 'volt',
|
|
]);
|
|
return $view;
|
|
});
|
|
|
|
$dependencyInjector->setShared('auth', function () {
|
|
return new AdminAuth();
|
|
});
|
|
}
|
|
|
|
}
|