private function resolveNamespace($parameters, $handler, $matches)
    {
        if (isset($handler['module'])) {
            $moduleName = $handler['module'];
            if ($this->isPlaceholder($moduleName)) {
                foreach ($handler as $target => $placeholder) {
                    foreach ($parameters as $key => $parameterName) {
                        if ($parameterName[0][0] == $placeholder) {
                            if ($target == 'module') {
                                $moduleName = $matches[$key];
                            }
                        }
                    }
                }
            }

            return implode(
                '\\',
                [
                    $this->baseNamespace,
                    $this->moduleName,
                    $moduleName,
                    $this->controllerName
                ]
            );
        }

        return $this->baseNamespace.'\\'.$this->controllerName;
    }