This library is no longer activly maintained or updated. It might still work, but use at your own risk.
Pusher PHP SDK for CodeIgniter
This is a simple library that wraps the Pusher PHP library and give you access to the Pusher methods using regular CodeIgniter syntax.
- Download the library files and add the them to your CodeIgniter installation. Only the library, config and composer.js files are required.
- In CodeIgniter
- Update the pusher.php config file in
/application/config/pusher.phpwith you app details.
- Install the Pusher PHP SDK by navigating to your applications folder and execute
- Autoload the library in
application/config/autoload.phpor load it where you need it with
How to use
Example to send a new message to the client
$this->load->library('ci_pusher'); $pusher = $this->ci_pusher->get_pusher(); $pusher->trigger('test_channel', 'my_event', array('message' => 'Hello World'));
More detailed documentation can be found in Pusher PHP SDK documentation
v2.0.0 - June 2015
- Created new function that returns the Pusher object.
- Removed all of the duplicated Pusher function used in previous version.
- Made small change to debug class name.
- Updated example code.
v.1.0.0 - April 2015
- Initial release.