$request
$request : \Psr\Http\Message\RequestInterface
This is a clone of the request the client have send to this server.
This component represents the application as a set of HTTP rules.
$application : \Gishiki\Core\Application|null
__construct(\Psr\Http\Message\RequestInterface $controllerRequest, \Psr\Http\Message\ResponseInterface $controllerResponse, \Gishiki\Algorithms\Collections\GenericCollection $controllerArguments, array $plugins, \Gishiki\Core\Application|null $app = null)
Create a new controller that will fulfill the given request filling the given response.
Warning: you should never attempt to use another construction in your controllers, unless it calls parent::__construct(), and it doesn't accept arguments
\Psr\Http\Message\RequestInterface | $controllerRequest | the request arrived from the client |
\Psr\Http\Message\ResponseInterface | $controllerResponse | the response to be given to the client |
\Gishiki\Algorithms\Collections\GenericCollection | $controllerArguments | the collection of matched URI params and GET params |
array | $plugins | the array containing passed plugins |
\Gishiki\Core\Application|null | $app | the current application instance |
the error preventing the controller creation
__call(string $name, array $arguments) : mixed
Execute a function of any plugin that has been bind to this controller:
class MyPlugin extends Plugin {
public function doSomethingSpecial($arg1, $arg2) {
} }
//inside the controller: $this->doSomethingSpecial($name, $surname);
string | $name | the name of the called function |
array | $arguments | the list of passed arguments as an array |
the function doesn't exists in any plugin
the value returned from the function