本文整理汇总了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'));
}