private function getFunctionAdvicesFromAdvisor(
        ReflectionFileNamespace $namespace,
        Aop\PointcutAdvisor $advisor,
        string $advisorId,
        Aop\PointFilter $pointcut
    ): array {
        $functions = [];
        $advices   = [];

        $listOfGlobalFunctions = get_defined_functions();
        foreach ($listOfGlobalFunctions['internal'] as $functionName) {
            $functions[$functionName] = new NamespacedReflectionFunction($functionName, $namespace->getName());
        }

        foreach ($functions as $functionName => $function) {
            if ($pointcut->matches($function, $namespace)) {
                $advices[AspectContainer::FUNCTION_PREFIX][$functionName][$advisorId] = $advisor->getAdvice();
            }
        }

        return $advices;
    }
private function getFunctionAdvicesFromAdvisor(
        ReflectionFileNamespace $namespace,
        Aop\PointcutAdvisor $advisor,
        string $advisorId,
        Aop\PointFilter $pointcut
    ): array {
        $functions = [];
        $advices   = [];

        $listOfGlobalFunctions = get_defined_functions();
        foreach ($listOfGlobalFunctions['internal'] as $functionName) {
            $functions[$functionName] = new NamespacedReflectionFunction($functionName, $namespace->getName());
        }

        foreach ($functions as $functionName => $function) {
            if ($pointcut->matches($function, $namespace)) {
                $advices[AspectContainer::FUNCTION_PREFIX][$functionName][$advisorId] = $advisor->getAdvice();
            }
        }

        return $advices;
    }
private function getFunctionAdvicesFromAdvisor ( ReflectionFileNamespace $ namespace , Aop \ PointcutAdvisor $ advisor , string $ advisorId , Aop \ PointFilter $ pointcut ) : array { $ functions = [ ] ; $ advices = [ ] ; $ listOfGlobalFunctions = get_defined_functions ( ) ; foreach ( $ listOfGlobalFunctions [ 'internal' ] as $ functionName ) { $ functions [ $ functionName ] = new NamespacedReflectionFunction ( $ functionName , $ namespace -> getName ( ) ) ; } foreach ( $ functions as $ functionName => $ function ) { if ( $ pointcut -> matches ( $ function , $ namespace ) ) { $ advices [ AspectContainer :: FUNCTION_PREFIX ] [ $ functionName ] [ $ advisorId ] = $ advisor -> getAdvice ( ) ; } } return $ advices ; }
Returns list of function advices for specific namespace
Returns list of function advices for specific namespace