Fixed PHPCS.
This commit is contained in:
parent
e0803df283
commit
4fe62ea248
8 changed files with 22 additions and 18 deletions
|
|
@ -58,8 +58,7 @@ class Application extends b8\Application
|
|||
UserStore $userStore,
|
||||
ProjectStore $projectStore,
|
||||
Container $container
|
||||
)
|
||||
{
|
||||
) {
|
||||
$this->config = $config;
|
||||
$this->response = $response;
|
||||
$this->request = $request;
|
||||
|
|
@ -165,7 +164,7 @@ class Application extends b8\Application
|
|||
public function getController()
|
||||
{
|
||||
if (empty($this->controller)) {
|
||||
$this->controller = $this->container->get('application.controller.' . strtolower($this->route['controller']));
|
||||
$this->controller = $this->container->get($this->getControllerId($this->route));
|
||||
}
|
||||
|
||||
return $this->controller;
|
||||
|
|
@ -180,7 +179,19 @@ class Application extends b8\Application
|
|||
*/
|
||||
public function controllerExists($route)
|
||||
{
|
||||
return $this->container->has('application.controller.' . strtolower($route['controller']));
|
||||
return $this->container->has($this->getControllerId($route));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create controller service Id based on specified route.
|
||||
*
|
||||
* @param array $route
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getControllerId($route)
|
||||
{
|
||||
return 'application.controller.' . strtolower($route['controller']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue