use Org\Mxchange\CoreFramework\Index\Indexable;
use Org\Mxchange\CoreFramework\Lists\Listable;
use Org\Mxchange\CoreFramework\Loader\ClassLoader;
+use Org\Mxchange\CoreFramework\Localization\ManageableLanguage;
use Org\Mxchange\CoreFramework\Manager\ManageableApplication;
+use Org\Mxchange\CoreFramework\Menu\RenderableMenu;
use Org\Mxchange\CoreFramework\Middleware\Compressor\CompressorChannel;
use Org\Mxchange\CoreFramework\Middleware\Debug\DebugMiddleware;
use Org\Mxchange\CoreFramework\Parser\Parseable;
+use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Registry\Register;
-use Org\Mxchange\CoreFramework\Registry\Registry;
use Org\Mxchange\CoreFramework\Resolver\Resolver;
use Org\Mxchange\CoreFramework\Result\Database\CachedDatabaseResult;
use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
* @return void
*/
public final function setConfigInstance (FrameworkConfiguration $configInstance) {
- Registry::getRegistry()->addInstance('config', $configInstance);
+ GenericRegistry::getRegistry()->addInstance('config', $configInstance);
}
/**
* @return $configInstance Configuration instance
*/
public final function getConfigInstance () {
- $configInstance = Registry::getRegistry()->getInstance('config');
+ $configInstance = GenericRegistry::getRegistry()->getInstance('config');
return $configInstance;
}
* @return void
*/
public final function setDebugInstance (DebugMiddleware $debugInstance) {
- Registry::getRegistry()->addInstance('debug', $debugInstance);
+ GenericRegistry::getRegistry()->addInstance('debug', $debugInstance);
}
/**
*/
public final function getDebugInstance () {
// Get debug instance
- $debugInstance = Registry::getRegistry()->getInstance('debug');
+ $debugInstance = GenericRegistry::getRegistry()->getInstance('debug');
// Return it
return $debugInstance;
* @return void
*/
public final function setWebOutputInstance (OutputStreamer $webInstance) {
- Registry::getRegistry()->addInstance('web_output', $webInstance);
+ GenericRegistry::getRegistry()->addInstance('web_output', $webInstance);
}
/**
* @return $webOutputInstance - Instance to class WebOutput
*/
public final function getWebOutputInstance () {
- $webOutputInstance = Registry::getRegistry()->getInstance('web_output');
+ $webOutputInstance = GenericRegistry::getRegistry()->getInstance('web_output');
return $webOutputInstance;
}
* @return void
*/
public final function setDatabaseInstance (DatabaseConnection $databaseInstance) {
- Registry::getRegistry()->addInstance('db_instance', $databaseInstance);
+ GenericRegistry::getRegistry()->addInstance('db_instance', $databaseInstance);
}
/**
*/
public final function getDatabaseInstance () {
// Get instance
- $databaseInstance = Registry::getRegistry()->getInstance('db_instance');
+ $databaseInstance = GenericRegistry::getRegistry()->getInstance('db_instance');
// Return instance
return $databaseInstance;
* @return void
*/
public final function setCompressorChannel (CompressorChannel $compressorInstance) {
- Registry::getRegistry()->addInstance('compressor', $compressorInstance);
+ GenericRegistry::getRegistry()->addInstance('compressor', $compressorInstance);
}
/**
* @return $compressorInstance The compressor channel
*/
public final function getCompressorChannel () {
- $compressorInstance = Registry::getRegistry()->getInstance('compressor');
+ $compressorInstance = GenericRegistry::getRegistry()->getInstance('compressor');
return $compressorInstance;
}
- /**
- * Protected getter for a manageable application helper class
- *
- * @return $applicationInstance An instance of a manageable application helper class
- */
- protected final function getApplicationInstance () {
- $applicationInstance = Registry::getRegistry()->getInstance('app');
- return $applicationInstance;
- }
-
- /**
- * Setter for a manageable application helper class
- *
- * @param $applicationInstance An instance of a manageable application helper class
- * @return void
- */
- public final function setApplicationInstance (ManageableApplication $applicationInstance) {
- Registry::getRegistry()->addInstance('application', $applicationInstance);
- }
-
/**
* Private getter for language instance
*
* @return $langInstance An instance to the language sub-system
*/
protected final function getLanguageInstance () {
- $langInstance = Registry::getRegistry()->getInstance('language');
+ $langInstance = GenericRegistry::getRegistry()->getInstance('language');
return $langInstance;
}
* @see LanguageSystem
*/
public final function setLanguageInstance (ManageableLanguage $langInstance) {
- Registry::getRegistry()->addInstance('language', $langInstance);
+ GenericRegistry::getRegistry()->addInstance('language', $langInstance);
}
/**
// Is the application instance set?
if (is_null($applicationInstance)) {
// Get the current instance
- $applicationInstance = Registry::getRegistry()->getInstance('app');
+ $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
// Still null?
if (is_null($applicationInstance)) {
*/
public final static function createDebugInstance ($className, $lineNumber = NULL) {
// Is the instance set?
- if (!Registry::getRegistry()->instanceExists('debug')) {
+ if (!GenericRegistry::getRegistry()->instanceExists('debug')) {
// Init debug instance
$debugInstance = NULL;
DebugMiddleware::getSelfInstance()->output('');
// Set it in registry
- Registry::getRegistry()->addInstance('debug', $debugInstance);
+ GenericRegistry::getRegistry()->addInstance('debug', $debugInstance);
} else {
// Get instance from registry
- $debugInstance = Registry::getRegistry()->getInstance('debug');
+ $debugInstance = GenericRegistry::getRegistry()->getDebugInstance();
}
// Return it
*/
protected function initWebOutputInstance () {
// Get application instance
- $applicationInstance = Registry::getRegistry()->getInstance('app');
+ $applicationInstance = GenericRegistry::getRegistry()->getInstance('application');
// Init web output instance
$outputInstance = ObjectFactory::createObjectByConfiguredName('output_class', array($applicationInstance));