src/Dispatcher/ClassAutoBind.php
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;
    }
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;
    }
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 ; }
Resolve proper namespace according parameters, handler and matches

@param mixed $parameters route parameters
@param mixed $handler    handler that should be executed
@param mixed $matches    found matched variables

@return mixed
Resolve proper namespace according parameters handler and matches