mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 00:11:53 +00:00
idanoo
80d64e79ff
2.0.0 (2021-02-19) Moved to PSR-4 Namespaced codebase Added more comments throughout Co-Authored-By: idanoo <daniel@m2.nz> Co-Committed-By: idanoo <daniel@m2.nz>
28 lines
736 B
PHP
28 lines
736 B
PHP
<?php
|
|
|
|
namespace Resque\Example;
|
|
|
|
// 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 = [
|
|
__DIR__ . '/../../vendor/autoload.php',
|
|
__DIR__ . '/../../../../autoload.php',
|
|
__DIR__ . '/../vendor/autoload.php',
|
|
];
|
|
|
|
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
|
|
);
|
|
}
|