protected function addBuildMethodsAndAdvicesCodeToClass(string $className, ClassNameIndex $treatedSubClasses): ClassNameIndex
    {
        if ($treatedSubClasses->hasClassName($className)) {
            return $treatedSubClasses;
        }

        $treatedSubClasses = $treatedSubClasses->union(new ClassNameIndex([$className]));
        if ($this->reflectionService->isClassReflected($className) === false) {
            return $treatedSubClasses;
        }

        $proxyClass = $this->compiler->getProxyClass($className);
        if ($proxyClass === false) {
            return $treatedSubClasses;
        }

        $callBuildMethodsAndAdvicesArrayCode = "        if (method_exists(get_parent_class(), 'Flow_Aop_Proxy_buildMethodsAndAdvicesArray') && is_callable('parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray')) parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray();\n";
        $proxyClass->getConstructor()->addPreParentCallCode($callBuildMethodsAndAdvicesArrayCode);
        $proxyClass->getMethod('__wakeup')->addPreParentCallCode($callBuildMethodsAndAdvicesArrayCode);

        return $treatedSubClasses;
    }
protected function addBuildMethodsAndAdvicesCodeToClass(string $className, ClassNameIndex $treatedSubClasses): ClassNameIndex
    {
        if ($treatedSubClasses->hasClassName($className)) {
            return $treatedSubClasses;
        }

        $treatedSubClasses = $treatedSubClasses->union(new ClassNameIndex([$className]));
        if ($this->reflectionService->isClassReflected($className) === false) {
            return $treatedSubClasses;
        }

        $proxyClass = $this->compiler->getProxyClass($className);
        if ($proxyClass === false) {
            return $treatedSubClasses;
        }

        $callBuildMethodsAndAdvicesArrayCode = "        if (method_exists(get_parent_class(), 'Flow_Aop_Proxy_buildMethodsAndAdvicesArray') && is_callable('parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray')) parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray();\n";
        $proxyClass->getConstructor()->addPreParentCallCode($callBuildMethodsAndAdvicesArrayCode);
        $proxyClass->getMethod('__wakeup')->addPreParentCallCode($callBuildMethodsAndAdvicesArrayCode);

        return $treatedSubClasses;
    }
protected function addBuildMethodsAndAdvicesCodeToClass ( string $ className , ClassNameIndex $ treatedSubClasses ) : ClassNameIndex { if ( $ treatedSubClasses -> hasClassName ( $ className ) ) { return $ treatedSubClasses ; } $ treatedSubClasses = $ treatedSubClasses -> union ( new ClassNameIndex ( [ $ className ] ) ) ; if ( $ this -> reflectionService -> isClassReflected ( $ className ) === false ) { return $ treatedSubClasses ; } $ proxyClass = $ this -> compiler -> getProxyClass ( $ className ) ; if ( $ proxyClass === false ) { return $ treatedSubClasses ; } $ callBuildMethodsAndAdvicesArrayCode = "        if (method_exists(get_parent_class(), 'Flow_Aop_Proxy_buildMethodsAndAdvicesArray') && is_callable('parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray')) parent::Flow_Aop_Proxy_buildMethodsAndAdvicesArray();\n" ; $ proxyClass -> getConstructor ( ) -> addPreParentCallCode ( $ callBuildMethodsAndAdvicesArrayCode ) ; $ proxyClass -> getMethod ( '__wakeup' ) -> addPreParentCallCode ( $ callBuildMethodsAndAdvicesArrayCode ) ; return $ treatedSubClasses ; }
Adds code to build the methods and advices array in case the parent class has some.

@param string $className
@param ClassNameIndex $treatedSubClasses
@return ClassNameIndex
Adds code to build the methods and advices array in case the parent class has some .