]> git.mxchange.org Git - core.git/blobdiff - framework/main/middleware/compressor/class_CompressorChannel.php
Continued:
[core.git] / framework / main / middleware / compressor / class_CompressorChannel.php
index 0baffa557e4c37fd2f757c2346bb1d48c53399ac..26f702cf41cc01cdf39f38b0ab73cd8c8cc2a84c 100644 (file)
@@ -1,19 +1,20 @@
 <?php
 // Own namespace
-namespace CoreFramework\Middleware\Compressor;
+namespace Org\Mxchange\CoreFramework\Middleware\Compressor;
 
 // Import framework stuff
-use CoreFramework\Compressor\Compressor;
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Middleware\BaseMiddleware;
-use CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Compressor\Compressor;
+use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory;
+use Org\Mxchange\CoreFramework\Middleware\BaseMiddleware;
+use Org\Mxchange\CoreFramework\Registry\Registerable;
 
 /**
  * Middleware class for selecting the right compressor channel
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -62,8 +63,8 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                ) {
                        // Init base directory
                        $baseDir =
-                               $compressorInstance->getConfigInstance()->getConfigEntry('framework_base_path') .
-                               $compressorInstance->getConfigInstance()->getConfigEntry('compressor_base_path');
+                               FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('framework_base_path') .
+                               FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('compressor_base_path');
 
                        // Get a directory pointer
                        $directoryInstance = ObjectFactory::createObjectByConfiguredName('directory_class', array($baseDir));
@@ -71,7 +72,7 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                        // Read all directories but no sub directories, .htaccess files and NullCompressor class
                        while ($directoryEntry = $directoryInstance->readDirectoryExcept(array('.htaccess', 'class_NullCompressor.php'))) {
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMPRESSOR[' . __METHOD__ . ':' . __LINE__ . ']: directoryEntry=' . $directoryEntry);
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMPRESSOR: directoryEntry=' . $directoryEntry);
 
                                // Is this a class file?
                                if ((substr($directoryEntry, 0, 6) == 'class_') && (substr($directoryEntry, -4, 4) == '.php')) {
@@ -85,7 +86,7 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
 
                                        // Create full class name (with namespace
                                        $fullClassName = sprintf(
-                                               'CoreFramework\Compressor\%s\%s',
+                                               'Org\Mxchange\CoreFramework\Compressor\%s\%s',
                                                str_replace('Compressor', '', $baseClassName),
                                                $baseClassName
                                        );
@@ -119,7 +120,7 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                ) {
                        // Set the null compressor handler. This should not be configureable!
                        // @TODO Is there a configurable fall-back compressor needed, or is NullCompressor okay?
-                       $compressorInstance->setCompressor(ObjectFactory::createObjectByName('CoreFramework\Compressor\Null\NullCompressor'));
+                       $compressorInstance->setCompressor(ObjectFactory::createObjectByName('Org\Mxchange\CoreFramework\Compressor\Null\NullCompressor'));
                } // END - if
 
                // Return the compressor instance