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


PHP Events::register方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $this->ci =& get_instance();
     $this->fallbacks = array('comments' => array('comments' => 'email/comment'), 'contact' => array('contact' => 'email/contact'));
     //register the email event
     Events::register('email', array($this, 'send_email'));
 }
开发者ID:blekedeg,项目名称:lbhpers,代码行数:7,代码来源:events.php

示例2: init

 /**
  * Register listeners for events
  */
 public function init()
 {
     Events::register('settings_general_update', array($this, 'general_update'));
     Events::register('settings_authentication_update', array($this, 'authentication_update'));
     Events::register('settings_ldap_update', array($this, 'ldap_update'));
     Events::register('settings_ldap_groups_update', array($this, 'ldap_groups_update'));
     Events::register('settings_preauth_update', array($this, 'preauth_update'));
 }
开发者ID:dellins,项目名称:classroombookings,代码行数:11,代码来源:Event_settings.php

示例3: __construct

 public function __construct($order_id)
 {
     $this->order_id = (int) $order_id;
     //При генериации счета
     Events::register('generateInvoice2', array($this, 'reservePriceInprogress'));
     //Вешаем обработку события при генерации файла
     Events::register('generate_file', array($this, 'saveFileForEvents'));
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:8,代码来源:tservices_order_history.php

示例4: __construct

 public function __construct()
 {
     $this->ci =& get_instance();
     // register the public_controller event when this file is autoloaded
     Events::register('post_user_register', array($this, 'save_authentication'));
     // Post a blog to twitter and whatnot
     Events::register('blog_article_published', array($this, 'post_status'));
 }
开发者ID:relinkus,项目名称:ManageFan,代码行数:8,代码来源:events.php

示例5: __construct

 public function __construct()
 {
     // this is triggered on every front-end page load and run_system_cron() checks
     // to see if this is a bot. If it's a bot we don't care if they get a slightly slower page load
     Events::register('public_controller', array($this, 'run_system_cron'));
     // this is a just a regular task that we use to maintain the session table.
     // Other modules can implement a cron task in a similar manner
     Events::register('system_cron', array($this, 'clean_sessions'));
 }
开发者ID:kulgee001,项目名称:yggdrasil,代码行数:9,代码来源:events.php

示例6: register_events

 private function register_events()
 {
     /**
      * Register events to be hooked.
      * Add more if required. :)
      */
     Events::register('before_invoice_number_generated', array($this, 'before_invoice_number_generated'));
     Events::register('invoice_number_generated', array($this, 'invoice_number_generated'));
 }
开发者ID:BrunoDeBarros,项目名称:Pancake-NumberingSystem,代码行数:9,代码来源:plugin.php

示例7: __construct

 public function __construct()
 {
     $this->ci =& get_instance();
     $this->ci->load->library('settings');
     $this->settings = $this->ci->settings;
     if ($this->settings->get('mailer_enabled')) {
         Events::register('contact_form_submitted', array($this, 'contact_form_submitted_send_confirmation'));
     }
 }
开发者ID:aslijiasheng,项目名称:ciFramework,代码行数:9,代码来源:events.php

示例8: __construct

 public function __construct()
 {
     $this->ci =& get_instance();
     $this->ci->load->model(array('Routes_model'));
     $this->ci->load->library('Ion_auth');
     $this->Routes_model = $this->ci->Routes_model;
     Events::register('user_updated', array($this, 'run_update'));
     Events::register('post_user_register', array($this, 'run_created'));
     Events::register('post_user_update', array($this, 'run_update'));
 }
开发者ID:nockout,项目名称:tshpro,代码行数:10,代码来源:events.php

示例9: __construct

 public function __construct()
 {
     $this->CI =& get_instance();
     // Register the admin_notification event
     Events::register('admin_notification', array($this, 'display_notifications'));
     // Delete the row_m and streams cache on create/update/delete
     Events::register('streams_post_insert_entry', array($this, 'clear_cache'));
     Events::register('streams_post_update_entry', array($this, 'clear_cache'));
     Events::register('streams_post_delete_entry', array($this, 'clear_cache'));
 }
开发者ID:KosBeg,项目名称:paybay,代码行数:10,代码来源:events.php

示例10: __construct

 public function __construct()
 {
     $this->ci = get_instance();
     $this->ci->load->library('settings');
     $this->settings = $this->ci->settings;
     if ($this->settings->get('mailer_enabled')) {
         Events::register('email', array($this, 'email'));
         Events::register('email_test', array($this, 'email_test'));
     }
 }
开发者ID:patilstar,项目名称:HMVC-WITH-CI,代码行数:10,代码来源:events.php

示例11: __construct

 public function __construct()
 {
     $this->ci =& get_instance();
     // register the events
     Events::register('product_created', array($this, 'product_created'));
     Events::register('product_updated', array($this, 'product_updated'));
     Events::register('product_delete', array($this, 'product_deleted'));
     Events::register('product_duplicated', array($this, 'product_duplicated'));
     Events::register('product_viewed', array($this, 'product_viewed'));
     Events::register('order_complete', array($this, 'order_complete'));
     Events::register('cart_item_added', array($this, 'cart_item_added'));
     Events::register('cart_updated', array($this, 'cart_updated'));
     Events::register('page_build', array($this, 'page_build'));
 }
开发者ID:rosellkarlrossj,项目名称:FireSALE,代码行数:14,代码来源:events.php

示例12: __construct

 public function __construct()
 {
     $this->ci =& get_instance();
     // Load the search index model
     $this->ci->load->model('search/search_index_m');
     // Post a blog to twitter and whatnot
     Events::register('post_published', array($this, 'index_post'));
     Events::register('post_updated', array($this, 'index_post'));
     Events::register('post_deleted', array($this, 'drop_post'));
     // Post a blog to twitter and whatnot
     Events::register('page_created', array($this, 'index_page'));
     Events::register('page_updated', array($this, 'index_page'));
     Events::register('page_deleted', array($this, 'drop_page'));
 }
开发者ID:arjint2004,项目名称:13815,代码行数:14,代码来源:events.php

示例13: __construct

 public function __construct()
 {
     $this->ci =& get_instance();
     // Register the events
     Events::register('cron_process_1', array($this, 'process_1'));
     Events::register('cron_process_5', array($this, 'process_5'));
     Events::register('cron_process_10', array($this, 'process_10'));
     Events::register('cron_process_15', array($this, 'process_15'));
     Events::register('cron_process_30', array($this, 'process_30'));
     Events::register('cron_process_60', array($this, 'process_60'));
     Events::register('cron_process_86400', array($this, 'process_86400'));
     // 1 day
     // Weekly days
     Events::register('cron_process_sunday', array($this, 'process_sunday'));
     Events::register('cron_process_monday', array($this, 'process_monday'));
     Events::register('cron_process_tuesday', array($this, 'process_tuesday'));
     Events::register('cron_process_wednesday', array($this, 'process_wednesday'));
     Events::register('cron_process_thursday', array($this, 'process_thursday'));
     Events::register('cron_process_friday', array($this, 'process_friday'));
     Events::register('cron_process_saturday', array($this, 'process_saturday'));
     // Monthly
     Events::register('cron_process_monthly', array($this, 'process_monthly'));
 }
开发者ID:jacksun101,项目名称:PyroAddons,代码行数:23,代码来源:events.php

示例14: test_array_callback

 public function test_array_callback()
 {
     Events::register('test_array_callback', array($this, 'callback'));
     $arr = array('foo' => 'bar');
     $this->assertEquals(Events::trigger('test_array_callback', $arr), $this->callback($arr));
 }
开发者ID:timothymarois,项目名称:CodeIgniter-Events,代码行数:6,代码来源:eventsTest.php

示例15: __construct

 public function __construct()
 {
     $this->ci =& get_instance();
     Events::register('order_update', array($this, 'run'));
 }
开发者ID:nockout,项目名称:tshpro,代码行数:5,代码来源:events.php


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