src/Router/RouterCommand.php
protected function resolveClass($class, $path, $namespace)
    {
        $file = realpath(rtrim($path, '/') . '/' . $class . '.php');
        if (! file_exists($file)) {
            return $this->exception($class . ' class is not found. Please, check file.');
        }

        require_once($file);
        $class = $namespace . str_replace('/', '\\', $class);

        return new $class();
    }
protected function resolveClass($class, $path, $namespace)
    {
        $file = realpath(rtrim($path, '/') . '/' . $class . '.php');
        if (! file_exists($file)) {
            return $this->exception($class . ' class is not found. Please, check file.');
        }

        require_once($file);
        $class = $namespace . str_replace('/', '\\', $class);

        return new $class();
    }
protected function resolveClass ( $ class , $ path , $ namespace ) { $ file = realpath ( rtrim ( $ path , '/' ) . '/' . $ class . '.php' ) ; if ( ! file_exists ( $ file ) ) { return $ this -> exception ( $ class . ' class is not found. Please, check file.' ) ; } require_once ( $ file ) ; $ class = $ namespace . str_replace ( '/' , '\\' , $ class ) ; return new $ class ( ) ; }
Resolve Controller or Middleware class.

@param $class
@param $path
@param $namespace

@return object
@throws
Resolve Controller or Middleware class .