public static function injectJoinPoints(string $targetClassName): void
    {
        $reflectionClass    = new ReflectionClass($targetClassName);
        $joinPointsProperty = $reflectionClass->getProperty(JoinPointPropertyGenerator::NAME);

        $joinPointsProperty->setAccessible(true);
        $advices    = $joinPointsProperty->getValue();
        $joinPoints = static::wrapWithJoinPoints($advices, $reflectionClass->getParentClass()->name);
        $joinPointsProperty->setValue($joinPoints);

        $staticInit = AspectContainer::STATIC_INIT_PREFIX . ':root';
        if (isset($joinPoints[$staticInit])) {
            $joinPoints[$staticInit]->__invoke();
        }
    }
public static function injectJoinPoints(string $targetClassName): void
    {
        $reflectionClass    = new ReflectionClass($targetClassName);
        $joinPointsProperty = $reflectionClass->getProperty(JoinPointPropertyGenerator::NAME);

        $joinPointsProperty->setAccessible(true);
        $advices    = $joinPointsProperty->getValue();
        $joinPoints = static::wrapWithJoinPoints($advices, $reflectionClass->getParentClass()->name);
        $joinPointsProperty->setValue($joinPoints);

        $staticInit = AspectContainer::STATIC_INIT_PREFIX . ':root';
        if (isset($joinPoints[$staticInit])) {
            $joinPoints[$staticInit]->__invoke();
        }
    }
public static function injectJoinPoints ( string $ targetClassName ) : void { $ reflectionClass = new ReflectionClass ( $ targetClassName ) ; $ joinPointsProperty = $ reflectionClass -> getProperty ( JoinPointPropertyGenerator :: NAME ) ; $ joinPointsProperty -> setAccessible ( true ) ; $ advices = $ joinPointsProperty -> getValue ( ) ; $ joinPoints = static :: wrapWithJoinPoints ( $ advices , $ reflectionClass -> getParentClass ( ) -> name ) ; $ joinPointsProperty -> setValue ( $ joinPoints ) ; $ staticInit = AspectContainer :: STATIC_INIT_PREFIX . ':root' ; if ( isset ( $ joinPoints [ $ staticInit ] ) ) { $ joinPoints [ $ staticInit ] -> __invoke ( ) ; } }
Inject advices into given class

NB This method will be used as a callback during source code evaluation to inject joinpoints
Inject advices into given class