/usr/bin/apigen is in php-apigen 4.1.2-1ubuntu2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #!/usr/bin/php
<?php
require 'ApiGen/autoload.php';
// Create temp dir
$tempDir = sys_get_temp_dir() . '/_apigen';
ApiGen\FileSystem\FileSystem::purgeDir($tempDir);
// Init debugger
Tracy\Debugger::$strictMode = TRUE;
if (isset($_SERVER['argv']) && ($tmp = array_search('--debug', $_SERVER['argv'], TRUE))) {
Tracy\Debugger::enable(Tracy\Debugger::DEVELOPMENT);
} else {
Tracy\Debugger::enable(Tracy\Debugger::PRODUCTION);
Tracy\Debugger::$onFatalError[] = function() use ($tempDir) {
echo "For more information turn on the debug mode using the --debug option.\n";
ApiGen\FileSystem\FileSystem::deleteDir($tempDir);
};
}
$configurator = new Nette\Configurator;
$configurator->setDebugMode( ! Tracy\Debugger::$productionMode);
$configurator->setTempDirectory($tempDir);
$configurator->addConfig(__DIR__ . '/../share/php/ApiGen/DI/config.neon');
$configurator->addParameters(['rootDir' => __DIR__ . '/../share/php/data/ApiGen']);
$container = $configurator->createContainer();
/** @var ApiGen\Console\Application $application */
$application = $container->getByType('ApiGen\Console\Application');
$application->run();
// Remove temp data
ApiGen\FileSystem\FileSystem::deleteDir($tempDir);
|