I am not sure but it seems it is not possible to inject request and response to the constructor of the BaseController. Is it possible or not? I want to achieve something like this
namespace App\Controllers;
use Apitte\Core\Http\ApiRequest;
use Apitte\Core\Http\ApiResponse;
/**
* @GroupPath("/api")
* @GroupId("api")
*/
abstract class BaseController implements IController
{
/**
* ApiRequest
*/
public $request;
/**
* ApiResponse
*/
public $response;
public function __construct(ApiRequest $request, ApiResponse $response)
{
$this->request = $request;
$this->response = $response;
}
namespace App\Controllers;
use Apitte\Core\Http\ApiRequest;
use Apitte\Core\Http\ApiResponse;
/**
* @GroupPath("/api")
* @GroupId("api")
*/
abstract class BaseController implements IController
{
/**
* @inject
* @var ApiRequest
*/
public $request;
/**
* @inject
* @var ApiResponse
*/
public $response;