protected function getActionInstance()
{
if (!isset($this->service_action)) {
if ($this->service_action_registry->hasServiceAction($this->matched_route)) {
$this->service_action = $this->service_action_registry->getServiceAction($this->matched_route);
$this->service_action->setService($this);
} else {
$this->service_action = $this->getDefaultAction();
}
if (!$this->service_action instanceof AbstractAction) {
throw DrestException::actionClassNotAnInstanceOfActionAbstract(get_class($this->service_action));
}
}
return $this->service_action;
}