summaryrefslogtreecommitdiffstats
path: root/src/bootstrap.php
blob: 4ffa9d10db064e8f7487993207d8fb726ba5b582 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

function includeIfExists($file)
{
    return file_exists($file) ? include $file : false;
}

if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {
    echo 'You must set up the project dependencies, run the following commands:'.PHP_EOL.
        'curl -sS https://getcomposer.org/installer | php'.PHP_EOL.
        'php composer.phar install'.PHP_EOL;
    exit(1);
}

return $loader;