#!/usr/bin/env php
<?php

//this script needs to be in the root directory of your app to work properly.
//Make sure that you have run `composer install` if the autoloader isn't working.

include 'vendor/autoload.php';

use Neptune\Config\Config;
use Neptune\Core\Neptune;
use Neptune\Console\Application as ConsoleApplication;
use Neptune\Console\OutputFormatter;
use Symfony\Component\Console\Output\ConsoleOutput;

$output = new ConsoleOutput();
$output->setFormatter(new OutputFormatter());

$neptune = new Neptune(__DIR__);

if (file_exists('app/Application.php')) {
    include 'app/Application.php';
    $app = new \Application();
    $app->start($neptune);
    $app->console($neptune, $output);
}

$app = new ConsoleApplication($neptune);
$app->run(null, $output);
