Skip to content

Commit

Permalink
删除 request 及 response
Browse files Browse the repository at this point in the history
  • Loading branch information
lhs168 committed Jan 21, 2018
1 parent 7c42c56 commit 462ccee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 59 deletions.
9 changes: 1 addition & 8 deletions src/Fasim/Core/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,6 @@ protected function registerFacdes() {
$this->singleton('security', function($app) {
return new Security();
});
//兼容
$this->singleton('request', function($app) {
return $this->make('input');
});
$this->singleton('response', function($app) {
return $this->make('output');
});

}

Expand Down Expand Up @@ -355,7 +348,7 @@ public function run() {
'message' => $exception->getMessage(),
'file' => $exception->getFile(),
'line' => $exception->getLine(),
'trace' => $exception->getBackTrace()
'trace' => $exception->getTrace()
];
$data = [
'error' => $error,
Expand Down
11 changes: 4 additions & 7 deletions src/Fasim/Core/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ class Controller {
public $config;
/**
* 系统输入类
* @var Request
* @var Input
*/
public $request;
public $input;
/**
* 系统输出类
* @var Response
* @var Output
*/
public $response;
public $output;
/**
* Session类
* @var Session
Expand All @@ -73,9 +73,6 @@ public function __construct($app, $controllerName) {

$this->input = $this->app->make('input');
$this->output = $this->app->make('output');
//兼容旧的
$this->request = $this->input;
$this->response = $this->output;

$this->session = \Fasim\Session\SessionFactory::getSession();

Expand Down
22 changes: 0 additions & 22 deletions src/Fasim/Facades/Request.php

This file was deleted.

22 changes: 0 additions & 22 deletions src/Fasim/Facades/Response.php

This file was deleted.

0 comments on commit 462ccee

Please sign in to comment.