public function shutdown(Event $event)
    {
        $action = $event->subject()->request->action;

        if (!isset($event->subject()->viewVars['_ws'])) {
            return;
        }

        $_ws = $event->subject()->viewVars['_ws'];
        $data = (isset($_ws) && isset($_ws['data'])) ? $_ws['data'] : null;
        $users = (isset($_ws) && isset($_ws['users'])) ? $_ws['users'] : null;

        if (get_class($users) === 'Cake\ORM\ResultSet') {
            $users = $users->extract('id')->toArray();
        } else {
            // not implemented yet
        }

        $trigger = new Trigger($this->_controller);
        $trigger->publish($data, $users);
    }