public function __construct() { $this->ci =& get_instance(); self::$instance = new RatchetioNotifier(array('access_token' => $this->ci->config->item('access_token_ratchetio'), 'environment' => ENVIRONMENT)); set_exception_handler('Ratchetio::report_exception'); set_error_handler('Ratchetio::report_php_error'); register_shutdown_function('Ratchetio::flush'); }
public static function init($config, $set_exception_handler = true, $set_error_handler = true) { self::$instance = new RatchetioNotifier($config); if ($set_exception_handler) { set_exception_handler('Ratchetio::report_exception'); } if ($set_error_handler) { set_error_handler('Ratchetio::report_php_error'); } if (self::$instance->batched) { register_shutdown_function('Ratchetio::flush'); } }