本文整理汇总了PHP中Varien_Event::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Event::getName方法的具体用法?PHP Varien_Event::getName怎么用?PHP Varien_Event::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Event
的用法示例。
在下文中一共展示了Varien_Event::getName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
/**
* @see MageUC_Developer_Bar_Panel_Interface::update(Varien_Event $event)
*/
public function update(Varien_Event $event)
{
if (!isset($this->_arEvents[$event->getName()])) {
$this->_arEvents[$event->getName()] = 0;
}
$this->_arEvents[$event->getName()] += 1;
$this->_totalEventDispatched++;
}
示例2: update
/**
* @see MageUC_Developer_Bar_Panel_Interface::update(Varien_Event $event)
*/
public function update(Varien_Event $event)
{
if ($event->getName() == self::EVENT_MAGE_LOG) {
self::$_arData[] = array('message' => $event->getMessage(), 'level' => $event->getLevel(), 'file' => $event->getFile());
}
return;
}
示例3: update
/**
* @see MageUC_Developer_Bar_Panel_Interface::update(Varien_Event $event)
*/
public function update(Varien_Event $event)
{
if (!$this->_profilerEnabled) {
Mage::getSingleton('core/resource')->getConnection('core_write')->getProfiler()->setEnabled(true);
$this->_profilerEnabled = true;
}
if ($event->getName() == MageUC_Developer_Bar::EVENT_POST_DISPATCH) {
$conn = Mage::getSingleton('core/resource')->getConnection('core_write');
$this->_profiler = $conn->getProfiler();
}
return;
}
示例4: addEvent
/**
* Register an event for this collection
*
* @param Varien_Event $event
* @return Varien_Event_Collection
*/
public function addEvent(Varien_Event $event)
{
$this->_events[$event->getName()] = $event;
return $this;
}
示例5: isValidFor
/**
* Checkes the observer's event_regex against event's name
*
* @param Varien_Event $event
* @return boolean
*/
public function isValidFor(Varien_Event $event)
{
return preg_match($this->getEventRegex(), $event->getName());
}
示例6: isValidFor
/**
* Checkes the observer's event_regex against event's name
*
* @param Varien_Event $event
* @return boolean
*/
public function isValidFor(Varien_Event $event)
{
return $this->getEventName() === $event->getName();
}