#!/bin/php
<?php
/**
* @author stev leibelt <artodeto@bazzline.net>
* @since 2014-06-10
*/
use Net\Bazzline\Component\Locator\ProcessPipeFactory;
//check if is installed as composer component - taken from pdepend
if (file_exists(__DIR__ . '/../../../autoload.php')) {
require_once __DIR__ . '/../../../autoload.php';
} else {
require_once __DIR__ . '/../vendor/autoload.php';
}
try {
$factory = new ProcessPipeFactory();
$output = $factory->create()->execute($argv);
/** @var \Net\Bazzline\Component\Locator\Configuration\Configuration $configuration */
$configuration = $output['configuration'];
echo $configuration->getClassName() . ' created in ' . $configuration->getFilePath() . PHP_EOL;
exit(0);
} catch (Exception $exception) {
echo '---------' . PHP_EOL;
echo '| Error |' . PHP_EOL;
echo '---------' . PHP_EOL;
echo $exception->getMessage() . PHP_EOL;
echo '---------------' . PHP_EOL;
echo '| Stack Trace |' . PHP_EOL;
echo '---------------' . PHP_EOL;
echo $exception->getTraceAsString() . PHP_EOL;
exit(1);
}
|