protected function calculateModulePath()
    {
        if (!$this->module || '/' == $this->module) {
            $this->modulePath = APP_ROOT;
        } else {
            if (isset($this->modules[$this->module]) && isset($this->modules[$this->module]['path'])) {
                $this->modulePath = $this->modules[$this->module]['path'];
            } else {
                $this->modulePath = APP_ROOT . 'modules' . DIRECTORY_SEPARATOR . $this->module . DIRECTORY_SEPARATOR;
            }
        }
    }