本文整理汇总了PHP中JLog::createDelegatedLogger方法的典型用法代码示例。如果您正苦于以下问题:PHP JLog::createDelegatedLogger方法的具体用法?PHP JLog::createDelegatedLogger怎么用?PHP JLog::createDelegatedLogger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JLog
的用法示例。
在下文中一共展示了JLog::createDelegatedLogger方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: register
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 4.0
*/
public function register(Container $container)
{
$container->share('InstallationApplicationWeb', function (Container $container) {
$app = new InstallationApplicationWeb(null, null, null, $container);
// The session service provider needs JFactory::$application, set it if still null
if (JFactory::$application === null) {
JFactory::$application = $app;
}
$app->setDispatcher($container->get('Joomla\\Event\\DispatcherInterface'));
$app->setLogger(JLog::createDelegatedLogger());
$app->setSession($container->get('Joomla\\Session\\SessionInterface'));
return $app;
}, true);
}
示例2: __construct
/**
* Class constructor.
*
* @param mixed $source Either a file path for a source image or a GD resource handler for an image.
*
* @since 11.3
* @throws RuntimeException
*/
public function __construct($source = null)
{
// Inject the PSR-3 compatible logger in for forward compatibility
$this->setLogger(JLog::createDelegatedLogger());
parent::__construct($source);
}