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')); }
/** * 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')); }
/** * Register listeners for events */ public function init() { Events::register('role_insert', array($this, 'role_insert')); Events::register('role_update', array($this, 'role_update')); Events::register('role_delete', array($this, 'role_delete')); Events::register('role_assign', array($this, 'role_assign')); Events::register('role_unassign', array($this, 'role_unassign')); }
public function __construct($order_id) { $this->order_id = (int) $order_id; //При генериации счета Events::register('generateInvoice2', array($this, 'reservePriceInprogress')); //Вешаем обработку события при генерации файла Events::register('generate_file', array($this, 'saveFileForEvents')); }
/** * Register listeners for events */ public function init() { Events::register('user_insert', array($this, 'user_insert')); Events::register('user_insert_ldap', array($this, 'user_insert_ldap')); Events::register('user_update', array($this, 'user_update')); Events::register('user_delete', array($this, 'user_delete')); Events::register('users_import', array($this, 'users_import')); }
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')); }
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')); }
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')); }
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')); } }
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')); }
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')); }
public function __construct() { $this->ci =& get_instance(); //register the public_controller event Events::register('public_controller', array($this, 'run')); //register a second event that can be called any time. // To execute the "run" method below you would use: Events::trigger('sample_event'); // in any php file within PyroCMS, even another module. Events::register('sample_event', array($this, 'run')); }
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')); } }
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')); }
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')); }
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')); }
public function __construct() { // register the events Events::register('subscribe_newsletter', array($this, 'subscribe_newsletter')); }
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)); }
public function __construct() { $this->ci =& get_instance(); Events::register('order_update', array($this, 'run')); }
/** * Register listeners for events */ public function init() { Events::register('group_insert', array($this, 'group_insert')); Events::register('group_update', array($this, 'group_update')); Events::register('group_delete', array($this, 'group_delete')); }
public function __construct() { $this->CI =& get_instance(); // Register the admin_notification event Events::register('admin_notification', array($this, 'display_notifications')); }
<?php ini_set('display_errors', 1); error_reporting(E_ALL ^ E_NOTICE); ini_set('max_execution_time', 0); ini_set('memory_limit', '512M'); if (!isset($_SERVER['DOCUMENT_ROOT']) || !strlen($_SERVER['DOCUMENT_ROOT'])) { $_SERVER['DOCUMENT_ROOT'] = rtrim(realpath(pathinfo(__FILE__, PATHINFO_DIRNAME) . '/../../'), '/'); } require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/stdf.php"; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/events.php'; class testIt { function test1($data) { return $data . '-22222'; } function test2($data) { return $data . '-33333'; } } $t = new testIt(); Events::register('test', array($t, 'test1')); Events::register('test', array($t, 'test2')); $res = Events::trigger('test', '11111', 'array'); print_r(current($res)); exit;
public function __construct() { $this->ci =& get_instance(); Events::register('public_controller', array($this, 'run')); }
/** * Register listeners for events */ public function init() { Events::register('user_login', array($this, 'user_login')); }
/** * Register listeners for events */ public function init() { Events::register('department_insert', array($this, 'department_insert')); Events::register('department_update', array($this, 'department_update')); Events::register('department_delete', array($this, 'department_delete')); }
public function __construct() { $this->ci =& get_instance(); //register the public controller event Events::register('public_controller', array($this, 'load_snippets')); }
public function __construct() { $this->ci =& get_instance(); // register the public_controller event when this file is autoloaded Events::register('public_controller', array($this, 'run')); }