本文整理匯總了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();
}