X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fhub%2Fmain%2Ffilter%2Fcruncher%2Fclass_CruncherInitializationFilter.php;h=32ce221d9eae8ec8824553183b4e55c4330b19c9;hb=3d5a6baf289a0b114668619f1184d6d6a1593755;hp=1c6c9af29ef8ccaf958cf58cb1cb145793c00689;hpb=1212b8422d9040c36c355c2c81c689dda7fd79ad;p=hub.git diff --git a/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php b/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php index 1c6c9af29..32ce221d9 100644 --- a/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php +++ b/application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team + * @copyright Copyright (c) 2011 - 2012 Cruncher Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class CruncherInitializationFilter extends BaseFilter implements Filterable { +class CruncherInitializationFilter extends BaseCruncherFilter implements Filterable { /** * Protected constructor * @@ -72,20 +72,20 @@ class CruncherInitializationFilter extends BaseFilter implements Filterable { // And try to instance it try { // Get an instance - $cruncherInstance = ObjectFactory::createObjectByName($className, array($requestInstance)); + $cruncherInstance = ObjectFactory::createObjectByName($className); // Get a registry - $appInstance = Registry::getRegistry()->getInstance('app'); + $applicationInstance = Registry::getRegistry()->getInstance('app'); // Set the app instance - $cruncherInstance->setApplicationInstance($appInstance); + $cruncherInstance->setApplicationInstance($applicationInstance); // Add cruncher-specific filters - $cruncherInstance->addExtraFilters($requestInstance, $responseInstance); + $cruncherInstance->addExtraFilters($applicationInstance->getControllerInstance(), $responseInstance); } catch (ClassNotFoundException $e) { // This exception means, the cruncher mode is invalid. - // @TODO Can we rewrite this to app_die() ? - die('Cruncher mode ' . $cruncherMode . ' is invalid.' . "\n"); + // @TODO Can we rewrite this to app_exit() ? + $this->debugBackTrace('[' . __METHOD__ . ':' . __LINE__ . ']: cruncher mode ' . $cruncherMode . ' is invalid.'); } // Set the cruncher instance in registry