private function bootFramework($withXE = false)
{
require $this->getBasePath('vendor/autoload.php');
$appFile = $this->getBasePath('bootstrap/app.php');
if (!file_exists($appFile)) {
throw new \Exception('Unable to find app loader: ~/bootstrap/app.php');
}
$app = (include $appFile);
$kernel = $app->make('Illuminate\\Contracts\\Console\\Kernel');
if ($withXE) {
$kernel->bootstrap(true);
} else {
$kernel->bootstrap();
}
return $app;
}