当前位置: 首页>>代码示例>>PHP>>正文


PHP unknown_type::getEventType方法代码示例

本文整理汇总了PHP中unknown_type::getEventType方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type::getEventType方法的具体用法?PHP unknown_type::getEventType怎么用?PHP unknown_type::getEventType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unknown_type的用法示例。


在下文中一共展示了unknown_type::getEventType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: notify

 /**
  * Notify Event Handler
  *
  * @param 	unknown_type $event
  * @access 	public
  */
 function notify($event)
 {
     // Make entity
     $f = owa_coreAPI::entityFactory('base.feed_request');
     $f->load($event->get('guid'));
     if (!$f->wasPersisted()) {
         $f->setProperties($event->getProperties());
         // Set Primary Key
         $f->set('id', $event->get('guid'));
         // Make ua id
         $f->set('ua_id', owa_lib::setStringGuid($event->get('HTTP_USER_AGENT')));
         // Make OS id
         $f->set('os_id', owa_lib::setStringGuid($event->get('os')));
         // Make document id
         $f->set('document_id', owa_lib::setStringGuid($event->get('page_url')));
         // Generate Host id
         $f->set('host_id', owa_lib::setStringGuid($event->get('host')));
         $f->set('subscription_id', $event->get('feed_subscription_id'));
         // Persist to database
         $ret = $f->create();
         if ($ret) {
             $eq = owa_coreAPI::getEventDispatch();
             $nevent = $eq->makeEvent($event->getEventType() . '_persisted');
             $nevent->setProperties($event->getProperties());
             $eq->notify($nevent);
             return OWA_EHS_EVENT_HANDLED;
         } else {
             return OWA_EHS_EVENT_FAILED;
         }
     } else {
         owa_coreAPI::debug('Not persisting. Feed request already exists.');
         return OWA_EHS_EVENT_HANDLED;
     }
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:40,代码来源:feedRequestHandlers.php

示例2: notify

 /**
  * Notify Event Handler
  *
  * @param 	unknown_type $event
  * @access 	public
  */
 function notify($event)
 {
     $this->m = $event;
     switch ($event->getEventType()) {
         case "base.reset_password":
             $this->handleEvent('base.usersResetPassword');
             break;
         case "base.set_password":
             $this->handleEvent('base.usersSetPassword');
             break;
         case "base.new_user_account":
             $this->handleEvent('base.usersNewAccount');
             break;
     }
     return OWA_EHS_EVENT_HANDLED;
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:22,代码来源:userHandlers.php

示例3: notify

 /**
  * Notify Event Handler
  *
  * @param 	unknown_type $event
  * @access 	public
  */
 function notify($event)
 {
     // Make entity
     $f = owa_coreAPI::entityFactory('base.feed_request');
     $f->load($event->get('guid'));
     if (!$f->wasPersisted()) {
         // rekey Feed subscription id tracking code
         // @todo check the wordpress plugin to see if this is even needed
         if (!$event->get('feed_subscription_id')) {
             $event->set('feed_subscription_id', $event->get(owa_coreAPI::getSetting('base', 'feed_subscription_param')));
         }
         // needed??
         $event->set('feed_reader_guid', $event->setEnvGUID());
         // set feedreader flag to true, browser flag to false
         $event->set('is_feedreader', true);
         $event->set('is_browser', false);
         // set params on entity
         $f->setProperties($event->getProperties());
         // Set Primary Key
         $f->set('id', $event->get('guid'));
         // Make ua id
         $f->set('ua_id', owa_lib::setStringGuid($event->get('HTTP_USER_AGENT')));
         // Make OS id
         $f->set('os_id', owa_lib::setStringGuid($event->get('os')));
         // Make document id
         $f->set('document_id', owa_lib::setStringGuid($event->get('page_url')));
         // Generate Host id
         $f->set('host_id', owa_lib::setStringGuid($event->get('host')));
         $f->set('subscription_id', $event->get('feed_subscription_id'));
         // Persist to database
         $ret = $f->create();
         if ($ret) {
             $eq = owa_coreAPI::getEventDispatch();
             $nevent = $eq->makeEvent($event->getEventType() . '_logged');
             $nevent->setProperties($event->getProperties());
             $eq->notify($nevent);
             return OWA_EHS_EVENT_HANDLED;
         } else {
             return OWA_EHS_EVENT_FAILED;
         }
     } else {
         owa_coreAPI::debug('Not persisting. Feed request already exists.');
         return OWA_EHS_EVENT_HANDLED;
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:51,代码来源:feedRequestHandlers.php


注:本文中的unknown_type::getEventType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。