<?php
// Import framework stuff
use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Connection\Database\DatabaseConnection;
use CoreFramework\Object\BaseFrameworkSystem;
use CoreFramework\Middleware\Debug\DebugMiddleware;
namespace CoreFramework\Object;
// Import framework stuff
+use CoreFramework\Compressor\Compressor;
use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Connection\Database\DatabaseConnection;
use CoreFramework\Controller\Controller;
use CoreFramework\Criteria\Criteria;
use CoreFramework\Criteria\Local\LocalSearchCriteria;
<?php
// Own namespace
-namespace CoreFramework\Compressor;
+namespace CoreFramework\Compressor\Bzip2;
// Import framework stuff
+use CoreFramework\Compressor\Compressor;
use CoreFramework\Object\BaseFrameworkSystem;
/**
<?php
// Own namespace
-namespace CoreFramework\Compressor;
+namespace CoreFramework\Compressor\Gzip;
// Import framework stuff
+use CoreFramework\Compressor\Compressor;
use CoreFramework\Object\BaseFrameworkSystem;
/**
<?php
// Own namespace
-namespace CoreFramework\Compressor;
+namespace CoreFramework\Compressor\Null;
// Import framework stuff
+use CoreFramework\Compressor\Compressor;
use CoreFramework\Object\BaseFrameworkSystem;
/**
<?php
// Own namespace
-namespace CoreFramework\Compressor;
+namespace CoreFramework\Compressor\Zlib;
// Import framework stuff
+use CoreFramework\Compressor\Compressor;
use CoreFramework\Object\BaseFrameworkSystem;
/**
<?php
// Own namespace
-namespace CoreFramework\Compression;
+namespace CoreFramework\Compressor;
// Import framework stuff
use CoreFramework\Generic\FrameworkInterface;
namespace CoreFramework\Middleware\Compressor;
// Import framework stuff
+use CoreFramework\Compressor\Compressor;
use CoreFramework\Factory\ObjectFactory;
use CoreFramework\Middleware\BaseMiddleware;
use CoreFramework\Registry\Registerable;
* your files like your classes and also that's why you
* must keep on class in one file.
*/
- $className = substr($directoryEntry, 6, -4);
+
+ // Base name of compressor class
+ $baseClassName = substr($directoryEntry, 6, -4);
+
+ // Create full class name (with namespace
+ $fullClassName = sprintf(
+ 'CoreFramework\Compressor\%s\%s',
+ str_replace('Compressor', '', $baseClassName),
+ $baseClassName
+ );
// Get an instance from our object factory
- $tempInstance = ObjectFactory::createObjectByName($className);
+ $tempInstance = ObjectFactory::createObjectByName($fullClassName);
// Is it null?
if (is_null($tempInstance)) {
) {
// 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('NullCompressor'));
+ $compressorInstance->setCompressor(ObjectFactory::createObjectByName('CoreFramework\Compressor\Null\NullCompressor'));
} // END - if
// Return the compressor instance
namespace CoreFramework\Connection\Database;
// Import framework stuff
+use CoreFramework\Connector\Database\DatabaseConnector;
use CoreFramework\Criteria\Criteria;
use CoreFramework\Criteria\Storing\StoreableCriteria;
use CoreFramework\Database\Backend\DatabaseBackend;