Elgg  Version 6.1
autoloader.php
Go to the documentation of this file.
1 <?php
7 $paths = [
8  __DIR__ . '/vendor/autoload.php',
9  __DIR__ . '/../../../vendor/autoload.php',
10 ];
11 
12 foreach ($paths as $path) {
13  if (!is_file($path)) {
14  continue;
15  }
16 
17  if (!is_readable($path)) {
18  echo "'$path' exists but is not readable by your webserver.\n";
19  break;
20  }
21 
22  $autoloader = (include $path);
23  if (!$autoloader) {
24  echo "'$path' was present but did not return a autoloader.\n";
25  break;
26  }
27 
28  return $autoloader;
29 }
30 
31 echo "You must set up the project dependencies. Run the following commands:\n" .
32  "curl -s http://getcomposer.org/installer | php\n" .
33  "php composer.phar install";
34 exit(1); // report a generic error
$paths
We handle here two possible locations of composer-generated autoload file.
Definition: autoloader.php:7
$path
Definition: details.php:70