/**
* Instantiates the controller class.
*
* @return Controller
*/
protected function createController() { assert(is_string($this->controller
));
$class =
new $this->
controller();
$class->
initController($this->request,
$this->response, Services::
logger());
$this->benchmark->
stop('controller_constructor'
);
return $class;
} /**
* Runs the controller, allowing for _remap methods to function.
*
* CI4 supports three types of requests:
* 1. Web: URI segments become parameters, sent to Controllers via Routes,
* output controlled by Headers to browser
* 2. PHP CLI: accessed by CLI via php public/index.php, arguments become URI segments,
* sent to Controllers via Routes, output varies
*
* @param Controller $class
*
* @return false|ResponseInterface|string|void
*/