break; case 'development': error_reporting(-1); ini_set('display_errors', 1); break; default: error_reporting($config->error_reporting); ini_set('display_errors', 1); break; } define('JDEBUG', $config->debug); unset($config); // Now that you have it, use jimport to get the specific packages your application needs. jimport('joomla.environment.uri'); jimport('joomla.utilities.date'); jimport('joomla.utilities.utility'); jimport('joomla.event.dispatcher'); jimport('joomla.utilities.arrayhelper'); //It's an application, so let's get the application helper. jimport('joomla.application.helper'); $client = new stdClass(); $client->name = 'administrator'; $client->id = 1; $client->path = JPATH_MYWEBAPP; JApplicationHelper::addClientInfo($client); $app = JFactory::getApplication('administrator'); // Initialise the application. $app->initialise(); // Render the application. This is just the name of a method you // create in your application.php $app->render();
/** * @since 3.4 */ public function testLegacyApplicationRouterIsStillLoaded() { JApplicationHelper::addClientInfo(array('id' => 3, 'name' => 'tester', 'path' => __DIR__ . '/data')); $this->assertInstanceOf('JRouter', JRouter::getInstance('tester')); }