public function init()
    {
        $request = $this->getRequest();

        // limit actions to HTTP common verbs
        if ($request->isGet()) {
            $action = $this->getParam('id') ? 'get' : 'index';
        } else {
            $action = $this->getParam('x-method', $request->getMethod());
        }

        $request
            ->setActionName($action)
            ->setDispatched(false)
            ->setParam('action', $action);
    }