public function createAutoloader($vendorDir = null)
    {
        if (! $vendorDir) {
            $vendorDir = __DIR__ . '/../../vendor';
        }

        $autoloader_location = $vendorDir . '/autoload.php';
        if (! file_exists($autoloader_location) || ! is_readable($autoloader_location)) {
            throw new \RuntimeException(
                'phpDocumentor expected to find an autoloader at "' . $autoloader_location . '" but it was not there. '
                . 'Usually this is because the "composer install" command has not been ran yet. If this is not the '
                . 'case, please open an issue at http://github.com/phpDocumentor/phpDocumentor2 detailing what '
                . 'installation method you used, which path is mentioned in this error message and any other relevant '
                . 'information.'
            );
        }

        return require $autoloader_location;
    }
public function createAutoloader($vendorDir = null)
    {
        if (! $vendorDir) {
            $vendorDir = __DIR__ . '/../../vendor';
        }

        $autoloader_location = $vendorDir . '/autoload.php';
        if (! file_exists($autoloader_location) || ! is_readable($autoloader_location)) {
            throw new \RuntimeException(
                'phpDocumentor expected to find an autoloader at "' . $autoloader_location . '" but it was not there. '
                . 'Usually this is because the "composer install" command has not been ran yet. If this is not the '
                . 'case, please open an issue at http://github.com/phpDocumentor/phpDocumentor2 detailing what '
                . 'installation method you used, which path is mentioned in this error message and any other relevant '
                . 'information.'
            );
        }

        return require $autoloader_location;
    }
public function createAutoloader ( $ vendorDir = null ) { if ( ! $ vendorDir ) { $ vendorDir = __DIR__ . '/../../vendor' ; } $ autoloader_location = $ vendorDir . '/autoload.php' ; if ( ! file_exists ( $ autoloader_location ) || ! is_readable ( $ autoloader_location ) ) { throw new \ RuntimeException ( 'phpDocumentor expected to find an autoloader at "' . $ autoloader_location . '" but it was not there. ' . 'Usually this is because the "composer install" command has not been ran yet. If this is not the ' . 'case, please open an issue at http://github.com/phpDocumentor/phpDocumentor2 detailing what ' . 'installation method you used, which path is mentioned in this error message and any other relevant ' . 'information.' ) ; } return require $ autoloader_location ; }
Initializes and returns the autoloader.

@param string|null $vendorDir A path (either absolute or relative to the current working directory) leading to
the vendor folder where composer installed the dependencies.

@throws \RuntimeException if no autoloader could be found.

@return ClassLoader
Initializes and returns the autoloader .