| 1 |
<?php |
| 2 |
function includeIfExists($file) |
| 3 |
{ |
| 4 |
if (file_exists($file)) { |
| 5 |
return include $file; |
| 6 |
} |
| 7 |
} |
| 8 |
if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) { |
| 9 |
die('You must set up the project dependencies, run the following commands:'.PHP_EOL. |
| 10 |
'curl -s http://getcomposer.org/installer | php'.PHP_EOL. |
| 11 |
'php composer.phar install'.PHP_EOL); |
| 12 |
} |
| 13 |
return $loader; |
| 14 |
|