@@ -30,10 +30,10 @@ |
||
30 | 30 | public function default($packageRoot, Request $request) |
31 | 31 | { |
32 | 32 | $packageRoot = rtrim($packageRoot, '/'); |
33 | - $path = $packageRoot . '/Route/' . $request->route() . '/' . $request->method() . '.php'; |
|
33 | + $path = $packageRoot.'/Route/'.$request->route().'/'.$request->method().'.php'; |
|
34 | 34 | if (file_exists($path)) { |
35 | 35 | require $path; |
36 | - $controllerClass = $request->package() . '\\Route_' . str_replace('/', '_', $request->route()) . '\\' . $request->method(); |
|
36 | + $controllerClass = $request->package().'\\Route_'.str_replace('/', '_', $request->route()).'\\'.$request->method(); |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @var BaseController $controller |
@@ -32,18 +32,18 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * Register autoload to app/$package/src dir's. |
34 | 34 | */ |
35 | - spl_autoload_register(function ($path) use ($packageRoot) { |
|
36 | - $package = rtrim($packageRoot, '/') . '/'; |
|
35 | + spl_autoload_register(function($path) use ($packageRoot) { |
|
36 | + $package = rtrim($packageRoot, '/').'/'; |
|
37 | 37 | $path = explode('\\', $path); |
38 | - array_shift($path); // Vendor |
|
38 | + array_shift($path); // Vendor |
|
39 | 39 | $package .= array_shift($path); // Package |
40 | - $path = $package . '/src/' . implode('/', $path) . '.php'; |
|
40 | + $path = $package.'/src/'.implode('/', $path).'.php'; |
|
41 | 41 | if (file_exists($path)) { |
42 | 42 | require_once $path; |
43 | 43 | } |
44 | 44 | }); |
45 | 45 | |
46 | - $packageRoot .= $request->package() . '/'; |
|
46 | + $packageRoot .= $request->package().'/'; |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * Process request. |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | /** |
56 | 56 | * Path to router class. |
57 | 57 | */ |
58 | - $path = $packageRoot . $request->packageRoute() . '.php'; |
|
58 | + $path = $packageRoot.$request->packageRoute().'.php'; |
|
59 | 59 | if (file_exists($path)) { |
60 | 60 | require $path; |
61 | 61 | /** |
62 | 62 | * Name of router class. |
63 | 63 | */ |
64 | - $route = $request->package() . '\\' . $request->packageRoute(); |
|
64 | + $route = $request->package().'\\'.$request->packageRoute(); |
|
65 | 65 | /** |
66 | 66 | * @var DefaultRoute $route |
67 | 67 | */ |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $response->headerStatus(404); |
88 | 88 | |
89 | 89 | $content = '404 Not Found'; |
90 | - if (file_exists($packageRoot . '/view/404.html.php')) { |
|
90 | + if (file_exists($packageRoot.'/view/404.html.php')) { |
|
91 | 91 | $template = new Native($packageRoot); |
92 | 92 | $content = $template->getContent('404.html.php'); |
93 | 93 | } |