CodeIgniter Forums
Event Triggering for Codeigniter - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Event Triggering for Codeigniter (/thread-61036.html)

Event Triggering for Codeigniter - El Forum - 09-02-2014

I would like to know if it is possible to use open cart events trigger and convert it with codeigniter

Because I would like to use it in one of my model functions. What would I need to do? I have my database cache set up.

If there is some thing similar to this all ready done with codeigniter please let me know cheers.

Model example

public function editStore($website_id, $data) {

$this->event->trigger('pre_admin_edit_store', $data);





Events lib. // Not sure if will work from open cart to codeigniter lib.

class Events {

  public function trigger($event, &$data = array()) {
        if (!array_key_exists($event, $this->events)) {
            return true;

        foreach ($this->events[$event] as $handler) {
            $parts = explode('/', $handler);

            $event = $this->load->event($parts[0] . '/' . $parts[1]);

            if (is_callable(array($event, $parts[2]))) {

        return true;

Event Triggering for Codeigniter - El Forum - 09-03-2014

CodeIgniter Events Library:

Events Library