public function initialize($strVendorDir = null)
    {
        $this->blnInitialized = true;
        $this->classmap = [];
        if ($strVendorDir !== null) {
            $strComposerAutoloadPath = $strVendorDir . '/autoload.php';
            if (file_exists($strComposerAutoloadPath)) {
                $this->composerAutoloader = require($strComposerAutoloadPath);
            }
            else {
                throw new \Exception('Cannot find composer autoloader');
            }
        }

        // Register our autoloader, making sure we go after the composer autoloader
        spl_autoload_register(array($this, 'autoload'), true, false);
        return $this;
    }
public function initialize($strVendorDir = null)
    {
        $this->blnInitialized = true;
        $this->classmap = [];
        if ($strVendorDir !== null) {
            $strComposerAutoloadPath = $strVendorDir . '/autoload.php';
            if (file_exists($strComposerAutoloadPath)) {
                $this->composerAutoloader = require($strComposerAutoloadPath);
            }
            else {
                throw new \Exception('Cannot find composer autoloader');
            }
        }

        // Register our autoloader, making sure we go after the composer autoloader
        spl_autoload_register(array($this, 'autoload'), true, false);
        return $this;
    }
public function initialize ( $ strVendorDir = null ) { $ this -> blnInitialized = true ; $ this -> classmap = [ ] ; if ( $ strVendorDir !== null ) { $ strComposerAutoloadPath = $ strVendorDir . '/autoload.php' ; if ( file_exists ( $ strComposerAutoloadPath ) ) { $ this -> composerAutoloader = require ( $ strComposerAutoloadPath ) ; } else { throw new \ Exception ( 'Cannot find composer autoloader' ) ; } } // Register our autoloader, making sure we go after the composer autoloader spl_autoload_register ( array ( $ this , 'autoload' ) , true , false ) ; return $ this ; }
Initialize the autoloader, passing the composer autoloader path if we are using it.

@param string|null $strVendorDir Composer autoloader path (Optional)
@return $this
Initialize the autoloader passing the composer autoloader path if we are using it .