Welcome Guest, Not a member yet? Register   Sign In
Event Triggering for Codeigniter

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;

CodeIgniter Events Library:

Events Library

Theme © iAndrew 2016 - Forum software by © MyBB