mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-24 17:25:13 +00:00
2f5b48930f
* recommend php-resque be installed via Composer * provide quick getting started steps * move ./resque.php to bin/resque, make it available as a Composer bin * have classes autoloaded via Composer (or some other means if not using Composer)
25 lines
680 B
PHP
25 lines
680 B
PHP
<?php
|
|
// Find and initialize Composer
|
|
// NOTE: You should NOT use this when developing against php-resque.
|
|
// The autoload code below is specifically for this demo.
|
|
$files = array(
|
|
__DIR__ . '/../../vendor/autoload.php',
|
|
__DIR__ . '/../../../../autoload.php',
|
|
__DIR__ . '/../vendor/autoload.php',
|
|
);
|
|
|
|
$found = false;
|
|
foreach ($files as $file) {
|
|
if (file_exists($file)) {
|
|
require_once $file;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (!class_exists('Composer\Autoload\ClassLoader', false)) {
|
|
die(
|
|
'You need to set up the project dependencies using the following commands:' . PHP_EOL .
|
|
'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
|
|
'php composer.phar install' . PHP_EOL
|
|
);
|
|
} |