1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-22 19:44:02 +08:00
xiaochong0302 43adee9ceb 1.重写view provider,数组赋值自动转对象
2.重写response provider,优化json输出格式
2020-04-25 18:36:32 +08:00

32 lines
622 B
PHP

<?php
namespace App\Http\Html5;
use App\Library\Mvc\View as MyView;
use App\Services\Auth\Html5 as Html5Auth;
use Phalcon\DiInterface;
use Phalcon\Mvc\ModuleDefinitionInterface;
class Module implements ModuleDefinitionInterface
{
public function registerAutoLoaders(DiInterface $di = null)
{
}
public function registerServices(DiInterface $di)
{
$di->setShared('view', function () {
$view = new MyView();
$view->disable();
return $view;
});
$di->setShared('auth', function () {
return new Html5Auth();
});
}
}