本文整理汇总了PHP中Context::getLogger方法的典型用法代码示例。如果您正苦于以下问题:PHP Context::getLogger方法的具体用法?PHP Context::getLogger怎么用?PHP Context::getLogger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Context
的用法示例。
在下文中一共展示了Context::getLogger方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param Context $context
*/
public function __construct(Context $context)
{
$this->_moduleManager = $context->getModuleManager();
$this->_logger = $context->getLogger();
$this->_request = $context->getRequest();
$this->_urlBuilder = $context->getUrlBuilder();
$this->_httpHeader = $context->getHttpHeader();
$this->_eventManager = $context->getEventManager();
$this->_remoteAddress = $context->getRemoteAddress();
$this->_cacheConfig = $context->getCacheConfig();
$this->urlEncoder = $context->getUrlEncoder();
$this->urlDecoder = $context->getUrlDecoder();
$this->scopeConfig = $context->getScopeConfig();
}
示例2: __construct
/**
* @param Context $context
* @param array $data
*/
public function __construct(Context $context, array $data = [])
{
$this->_conditionFactory = $context->getConditionFactory();
$this->_logger = $context->getLogger();
parent::__construct($context, $data);
$this->setType('Magento\\Rule\\Model\\Condition\\Combine')->setAggregator('all')->setValue(true)->setConditions([])->setActions([]);
$this->loadAggregatorOptions();
$options = $this->getAggregatorOptions();
if ($options) {
foreach (array_keys($options) as $aggregator) {
$this->setAggregator($aggregator);
break;
}
}
}
示例3: testGetLogger
public function testGetLogger()
{
$this->assertInstanceOf('\\Psr\\Log\\LoggerInterface', $this->context->getLogger());
}