*
* @author Roland Haeder <webmaster@ship-simu.org>
* @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
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class CruncherInitializationFilter extends BaseFilter implements Filterable {
+class CruncherInitializationFilter extends BaseCruncherFilter implements Filterable {
/**
* Protected constructor
*
// 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