本文整理匯總了PHP中JApplicationHelper::addClientInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP JApplicationHelper::addClientInfo方法的具體用法?PHP JApplicationHelper::addClientInfo怎麽用?PHP JApplicationHelper::addClientInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JApplicationHelper
的用法示例。
在下文中一共展示了JApplicationHelper::addClientInfo方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: error_reporting
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();
示例2: testLegacyApplicationRouterIsStillLoaded
/**
* @since 3.4
*/
public function testLegacyApplicationRouterIsStillLoaded()
{
JApplicationHelper::addClientInfo(array('id' => 3, 'name' => 'tester', 'path' => __DIR__ . '/data'));
$this->assertInstanceOf('JRouter', JRouter::getInstance('tester'));
}