From 02e5185e74bde6ee6448b8d6d412821f3d5300e2 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 30 Apr 2016 22:50:49 +0200 Subject: [PATCH] Performance, bug and design fixes --- Log/FileLogger.php | 2 +- Message/Http/Response.php | 17 ----------------- Module/InstallerAbstract.php | 2 +- Module/ModuleAbstract.php | 2 +- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/Log/FileLogger.php b/Log/FileLogger.php index 322a7e274..a79b510b5 100644 --- a/Log/FileLogger.php +++ b/Log/FileLogger.php @@ -297,7 +297,7 @@ class FileLogger implements LoggerInterface } if (self::$verbose) { - echo $message . "\n"; + echo $message , "\n"; } } diff --git a/Message/Http/Response.php b/Message/Http/Response.php index 9e5763225..062f00bbd 100644 --- a/Message/Http/Response.php +++ b/Message/Http/Response.php @@ -59,23 +59,6 @@ class Response extends ResponseAbstract implements RenderableInterface $this->response = $response; } - /** - * Push a specific response ID. - * - * @param int $id Response ID - * - * @return void - * - * @since 1.0.0 - * @author Dennis Eichhorn - */ - public function pushResponseId(int $id) - { - ob_start(); - echo $this->response[$id]; - ob_end_flush(); - } - /** * Remove response by ID. * diff --git a/Module/InstallerAbstract.php b/Module/InstallerAbstract.php index e611c5108..320bf265f 100644 --- a/Module/InstallerAbstract.php +++ b/Module/InstallerAbstract.php @@ -32,7 +32,6 @@ use phpOMS\Utils\Parser\Php\ArrayParser; */ class InstallerAbstract { - /** * Install module. * @@ -71,6 +70,7 @@ class InstallerAbstract $appRoutes = include $destRoutePath; /** @noinspection PhpIncludeInspection */ $moduleRoutes = include $srcRoutePath; + $appRoutes = array_merge_recursive($appRoutes, $moduleRoutes); if(is_writable($destRoutePath)) { diff --git a/Module/ModuleAbstract.php b/Module/ModuleAbstract.php index f54ed85ce..98848a171 100644 --- a/Module/ModuleAbstract.php +++ b/Module/ModuleAbstract.php @@ -135,7 +135,7 @@ abstract class ModuleAbstract { $lang = []; if (($path = realpath($oldPath = __DIR__ . '/../../Modules/' . static::MODULE_NAME . '/Theme/' . $destination . '/Lang/' . $language . '.lang.php')) === false) { - throw new PathException($oldPath); + return $lang; } /** @noinspection PhpIncludeInspection */