resourceClass = sprintf('Xentral\Modules\Api\Resource\%sResource', $resource); $this->controllerClass = sprintf('Xentral\Modules\Api\Controller\%s\%sController', $version, $controller); $this->controllerAction = $action; $this->params = $params; $this->permission = $permission; } /** * @return string */ public function getResourceClass() { return $this->resourceClass; } /** * @return string */ public function getControllerClass() { return $this->controllerClass; } /** * @return string */ public function getControllerAction() { return $this->controllerAction; } /** * @return array */ public function getRouterParams() { return $this->params; } /** * @return string|null */ public function getPermission() { return $this->permission; } /** * @return array */ public function toArray() { return [ 'controllerClass' => $this->getControllerClass(), 'controllerAction' => $this->getControllerAction(), 'resourceClass' => $this->getResourceClass(), 'routerParams' => $this->getRouterParams(), 'permission' => $this->getPermission(), ]; } }