<?php
function autoLoader() {
    $files = array(
      __DIR__ . '/../../../autoload.php',  // composer dependency
      __DIR__ . '/../vendor/autoload.php', // stand-alone package
    );
    foreach ($files as $file) {
        if (is_file($file)) {
            require_once $file;
            return true;
        }
    }
    return false;
};


if (!autoloader()) {
    die(
      'You need to set up the project dependencies using the following commands:' . PHP_EOL .
      'curl -sS https://getcomposer.org/installer | php' . PHP_EOL .
      'php composer.phar install' . PHP_EOL
    );
}

$app = new Dappur\Console\DappApplication();

$app->run();