/**
* Initializes all components used by phpDocumentor.
*
* @param ClassLoader $autoloader
* @param array $values
*/
public function __construct($autoloader = null, array $values = array())
{
$this->defineIniSettings();
self::$VERSION = strpos('@package_version@', '@') === 0 ? trim(file_get_contents(__DIR__ . '/../../VERSION')) : '@package_version@';
parent::__construct('phpDocumentor', self::$VERSION, $values);
$this['kernel.timer.start'] = time();
$this['kernel.stopwatch'] = function () {
return new Stopwatch();
};
$this['autoloader'] = $autoloader;
$this->register(new JmsSerializerServiceProvider());
$this->register(new Configuration\ServiceProvider());
$this->addEventDispatcher();
$this->addLogging();
$this->register(new ValidatorServiceProvider());
$this->register(new Translator\ServiceProvider());
$this->register(new Descriptor\ServiceProvider());
$this->register(new Parser\ServiceProvider());
$this->register(new Partials\ServiceProvider());
$this->register(new Transformer\ServiceProvider());
$this->register(new Plugin\ServiceProvider());
$this->addCommandsForProjectNamespace();
if (\Phar::running()) {
$this->addCommandsForPharNamespace();
}
}