| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* This file is part of Component Installer. |
| 5 |
* |
| 6 |
* (c) Rob Loach (http://robloach.net) |
| 7 |
* |
| 8 |
* For the full copyright and license information, please view the LICENSE.md |
| 9 |
* file that was distributed with this source code. |
| 10 |
*/ |
| 11 |
|
| 12 |
function includeIfExists($file) |
| 13 |
{ |
| 14 |
if (file_exists($file)) { |
| 15 |
return include $file; |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) { |
| 20 |
die('You must set up the project dependencies, run the following commands:'.PHP_EOL. |
| 21 |
'curl -s http://getcomposer.org/installer | php'.PHP_EOL. |
| 22 |
'php composer.phar install'.PHP_EOL); |
| 23 |
} |
| 24 |
|
| 25 |
return $loader; |
| 26 |
|