File: bootstrap.php

package info (click to toggle)
php-apigen 4.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 828 kB
  • ctags: 1,763
  • sloc: php: 7,026; makefile: 23; sh: 17
file content (20 lines) | stat: -rw-r--r-- 383 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

/**
 * @param string $file
 * @return bool
 */
function includeIfExists($file)
{
	return file_exists($file) ? include $file : FALSE;
}


if ( ! ($loader = includeIfExists(__DIR__ . '/../vendor/autoload.php'))
	&& ! ($loader = includeIfExists(__DIR__ . '/../../../autoload.php')))
{
	echo 'Missing autoload.php, update by the composer.' . PHP_EOL;
	exit(1);
}

return $loader;