



























共有 2 个文件被更改,包括 6 次插入 和 5 次删除
@ -5,15 +5,17 @@ namespace App;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class Controller {
|
||||
use Schmarty\Micropubkit\Controllers\Common\{ResponseAware,ResponseAwareTrait};
|
||||
|
||||
class Controller implements ResponseAware {
|
||||
|
||||
use ResponseAwareTrait;
|
||||
|
||||
private ResponseInterface $response;
|
||||
private \League\Plates\Engine $templates;
|
||||
private \App\Model\Site $site;
|
||||
private \App\Model\SiteCheck $siteCheck;
|
||||
|
||||
public function __construct(ResponseInterface $response, \League\Plates\Engine $templates, \App\Model\Site $site, \App\Model\SiteCheck $siteCheck) {
|
||||
$this->response = $response;
|
||||
public function __construct(\League\Plates\Engine $templates, \App\Model\Site $site, \App\Model\SiteCheck $siteCheck) {
|
||||
$this->templates = $templates;
|
||||
$this->site = $site;
|
||||
$this->siteCheck = $siteCheck;
|
||||
|
||||
@ -24,7 +24,6 @@ $app->container->addShared(App\Model\SiteCheck::class)->addArgument(App\DB::clas
|
||||
|
||||
// set up controller for welcome and forms
|
||||
$app->container->addShared(App\Controller::class)
|
||||
->addArgument(Psr\Http\Message\ResponseInterface::class)
|
||||
->addArgument(League\Plates\Engine::class)
|
||||
->addArgument(App\Model\Site::class)
|
||||
->addArgument(App\Model\SiteCheck::class);
|
||||
|
||||
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。