My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Usage  
Updated Mar 9, 2010 by danec...@gmail.com

Usage

In order to use the library you will first need to load the library. There are two ways to do this.
 

1. Load in the controller you want to use it in. $this->load->library('ErrorStack');

2. Add it to the autoload.php file. $autoload['libraries'] = array('ErrorStack');

In order to send an error to ErrorStack you can call the "send_error" function. This can be called in multiple ways.

1. $this->errorstack->send_error();

This way will use the parameters you set in your error_stack.php config file. It will also use the key and return type you set in the config file. 2. $this->errorstack->send_error(array(...));

This way will use the parameters you set in the config file as well as the parameters passed in the array. 3. $this->errorstack->send_error(array(...), an_errorstack_key);

This way will use the parameters you set in the config file as well as the parameters passed in the array. This also overrides the ErrorStack key you set in the config file it will use the key you passed in instead. If you don't want to send additional parameters but would still like to send a different key, send an empty array (array()) into the function. 4. $this->errorstack->send_error(array(...), an_errorstack_key, [json or img]);

This does the same as above but allows you to also override the result type you set in the config file. The only options are "json" and "img". 5. $this->errorstack->send_error(array(...), false, [json or img]);

This also does the same as #3 but allows you to pass extra parameters and a different result type without overriding the ErrorStack key you set in the config file.


Sign in to add a comment
Powered by Google Project Hosting