public function init(array $options = [])
    {
        if ($this->wasInitialized) {
            return;
        }

        $this->options = $this->normalizeOptions($options);
        define('AOP_ROOT_DIR', $this->options['appDir']);
        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($this->options, $container);

        // Register all AOP configuration in the container
        $this->configureAop($container);

        $this->wasInitialized = true;
    }
public function init(array $options = [])
    {
        if ($this->wasInitialized) {
            return;
        }

        $this->options = $this->normalizeOptions($options);
        define('AOP_ROOT_DIR', $this->options['appDir']);
        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($this->options, $container);

        // Register all AOP configuration in the container
        $this->configureAop($container);

        $this->wasInitialized = true;
    }
public function init ( array $ options = [ ] ) { if ( $ this -> wasInitialized ) { return ; } $ this -> options = $ this -> normalizeOptions ( $ options ) ; define ( 'AOP_ROOT_DIR' , $ this -> options [ 'appDir' ] ) ; 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 ( $ this -> options , $ container ) ; // Register all AOP configuration in the container $ this -> configureAop ( $ container ) ; $ this -> wasInitialized = true ; }
Init the kernel and make adjustments

@param array $options Associative array of options for kernel
Init the kernel and make adjustments