protected function registerTransformers(): array
    {
        $cacheManager     = $this->getContainer()->get('aspect.cache.path.manager');
        $filterInjector   = new FilterInjectorTransformer($this, SourceTransformingLoader::getId(), $cacheManager);
        $magicTransformer = new MagicConstantTransformer($this);

        $sourceTransformers = function () use ($filterInjector, $magicTransformer, $cacheManager) {
            $transformers = [];
            if ($this->hasFeature(Features::INTERCEPT_INITIALIZATIONS)) {
                $transformers[] = new ConstructorExecutionTransformer();
            }
            if ($this->hasFeature(Features::INTERCEPT_INCLUDES)) {
                $transformers[] = $filterInjector;
            }
            $transformers[]  = new SelfValueTransformer($this);
            $transformers[]  = new WeavingTransformer(
                $this,
                $this->container->get('aspect.advice_matcher'),
                $cacheManager,
                $this->container->get('aspect.cached.loader')
            );
            $transformers[] = $magicTransformer;

            return $transformers;
        };

        return [
            new CachingTransformer($this, $sourceTransformers, $cacheManager)
        ];
    }
protected function registerTransformers(): array
    {
        $cacheManager     = $this->getContainer()->get('aspect.cache.path.manager');
        $filterInjector   = new FilterInjectorTransformer($this, SourceTransformingLoader::getId(), $cacheManager);
        $magicTransformer = new MagicConstantTransformer($this);

        $sourceTransformers = function () use ($filterInjector, $magicTransformer, $cacheManager) {
            $transformers = [];
            if ($this->hasFeature(Features::INTERCEPT_INITIALIZATIONS)) {
                $transformers[] = new ConstructorExecutionTransformer();
            }
            if ($this->hasFeature(Features::INTERCEPT_INCLUDES)) {
                $transformers[] = $filterInjector;
            }
            $transformers[]  = new SelfValueTransformer($this);
            $transformers[]  = new WeavingTransformer(
                $this,
                $this->container->get('aspect.advice_matcher'),
                $cacheManager,
                $this->container->get('aspect.cached.loader')
            );
            $transformers[] = $magicTransformer;

            return $transformers;
        };

        return [
            new CachingTransformer($this, $sourceTransformers, $cacheManager)
        ];
    }
protected function registerTransformers ( ) : array { $ cacheManager = $ this -> getContainer ( ) -> get ( 'aspect.cache.path.manager' ) ; $ filterInjector = new FilterInjectorTransformer ( $ this , SourceTransformingLoader :: getId ( ) , $ cacheManager ) ; $ magicTransformer = new MagicConstantTransformer ( $ this ) ; $ sourceTransformers = function ( ) use ( $ filterInjector , $ magicTransformer , $ cacheManager ) { $ transformers = [ ] ; if ( $ this -> hasFeature ( Features :: INTERCEPT_INITIALIZATIONS ) ) { $ transformers [ ] = new ConstructorExecutionTransformer ( ) ; } if ( $ this -> hasFeature ( Features :: INTERCEPT_INCLUDES ) ) { $ transformers [ ] = $ filterInjector ; } $ transformers [ ] = new SelfValueTransformer ( $ this ) ; $ transformers [ ] = new WeavingTransformer ( $ this , $ this -> container -> get ( 'aspect.advice_matcher' ) , $ cacheManager , $ this -> container -> get ( 'aspect.cached.loader' ) ) ; $ transformers [ ] = $ magicTransformer ; return $ transformers ; } ; return [ new CachingTransformer ( $ this , $ sourceTransformers , $ cacheManager ) ] ; }
Returns list of source transformers, that will be applied to the PHP source

@return SourceTransformer[]
@internal This method is internal and should not be used outside this project
Returns list of source transformers that will be applied to the PHP source