From 81b3f218e7f7346ce18a710cabc877407739c591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danyi=20D=C3=A1vid?= Date: Thu, 18 Jan 2018 21:47:45 +0100 Subject: [PATCH] * unecessary factory removed, layout / prefix had to be changed instead --- config/autoload/dependencies.global.php | 3 +- src/App/Helper/ServerUrlHelperFactory.php | 34 ----------------------- templates/app/home-page.phtml | 4 +-- 3 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 src/App/Helper/ServerUrlHelperFactory.php diff --git a/config/autoload/dependencies.global.php b/config/autoload/dependencies.global.php index dbdd08e..35bff32 100644 --- a/config/autoload/dependencies.global.php +++ b/config/autoload/dependencies.global.php @@ -1,6 +1,5 @@ [ // Fully\Qualified\InterfaceName::class => Fully\Qualified\ClassName::class, + Helper\ServerUrlHelper::class => Helper\ServerUrlHelper::class, ], // Use 'factories' for services provided by callbacks/factory classes. 'factories' => [ Application::class => Container\ApplicationFactory::class, Delegate\NotFoundDelegate::class => Container\NotFoundDelegateFactory::class, - Helper\ServerUrlHelper::class => AppHelper\ServerUrlHelperFactory::class, Helper\ServerUrlMiddleware::class => Helper\ServerUrlMiddlewareFactory::class, Helper\UrlHelper::class => Helper\UrlHelperFactory::class, Helper\UrlHelperMiddleware::class => Helper\UrlHelperMiddlewareFactory::class, diff --git a/src/App/Helper/ServerUrlHelperFactory.php b/src/App/Helper/ServerUrlHelperFactory.php deleted file mode 100644 index 6a978fa..0000000 --- a/src/App/Helper/ServerUrlHelperFactory.php +++ /dev/null @@ -1,34 +0,0 @@ -get('config'); - $path = array_key_exists('los_basepath', $config) && !empty($config['los_basepath']) - ? $config['los_basepath'] - : null; - - $serverUrlHelper = new ServerUrlHelper(); - if ($path) { - $uri = (new Uri())->withPath($path); - $serverUrlHelper->setUri($uri); - } - return $serverUrlHelper; - } -} diff --git a/templates/app/home-page.phtml b/templates/app/home-page.phtml index b68dfc3..dab71f2 100644 --- a/templates/app/home-page.phtml +++ b/templates/app/home-page.phtml @@ -26,8 +26,8 @@ end() ?>