/**
* Init the kernel and make adjustments
*
* @param array $options Associative array of options for kernel
*/
public function init(array $options = array())
{
$this->options = $this->normalizeOptions($options);
define('AOP_CACHE_DIR', $this->options['cacheDir']);
/** @var $container AspectContainer */
$container = $this->container = new $this->options['containerClass']();
$container->set('kernel', $this);
$container->set('kernel.interceptFunctions', $this->hasFeature(Features::INTERCEPT_FUNCTIONS));
$container->set('kernel.options', $this->options);
SourceTransformingLoader::register();
foreach ($this->registerTransformers() as $sourceTransformer) {
SourceTransformingLoader::addTransformer($sourceTransformer);
}
// Register kernel resources in the container for debug mode
if ($this->options['debug']) {
$this->addKernelResourcesToContainer($container);
}
AopComposerLoader::init();
// Register all AOP configuration in the container
$this->configureAop($container);
}