src/Traits/ResolvesClasses.php
public function resolveClass(SplFileInfo $fileInfo, Closure $callback = null)
    {
        /** @noinspection PhpIncludeInspection */
        require_once $fileInfo->getPathname();

        $instance = app()->make($this->getModuleClassName($fileInfo));

        if (is_callable($callback)) {
            $callback($instance);
        }
    }
public function resolveClass(SplFileInfo $fileInfo, Closure $callback = null)
    {
        /** @noinspection PhpIncludeInspection */
        require_once $fileInfo->getPathname();

        $instance = app()->make($this->getModuleClassName($fileInfo));

        if (is_callable($callback)) {
            $callback($instance);
        }
    }
public function resolveClass ( SplFileInfo $ fileInfo , Closure $ callback = null ) { /** @noinspection PhpIncludeInspection */ require_once $ fileInfo -> getPathname ( ) ; $ instance = app ( ) -> make ( $ this -> getModuleClassName ( $ fileInfo ) ) ; if ( is_callable ( $ callback ) ) { $ callback ( $ instance ) ; } }
Resolves and Initializes Class by filename.

@param SplFileInfo $fileInfo
@param null|Closure $callback
Resolves and Initializes Class by filename .