public function getAdvicesForFunctions(ReflectionFileNamespace $namespace, array $advisors): array
    {
        if (!$this->isInterceptFunctions) {
            return [];
        }

        $advices = [];

        foreach ($advisors as $advisorId => $advisor) {
            if ($advisor instanceof Aop\PointcutAdvisor) {
                $pointcut = $advisor->getPointcut();
                $isFunctionAdvisor = $pointcut->getKind() & Aop\PointFilter::KIND_FUNCTION;
                if ($isFunctionAdvisor && $pointcut->getClassFilter()->matches($namespace)) {
                    $advices[] = $this->getFunctionAdvicesFromAdvisor($namespace, $advisor, $advisorId, $pointcut);
                }
            }
        }

        if (count($advices) > 0) {
            $advices = array_merge_recursive(...$advices);
        }

        return $advices;
    }
public function getAdvicesForFunctions(ReflectionFileNamespace $namespace, array $advisors): array
    {
        if (!$this->isInterceptFunctions) {
            return [];
        }

        $advices = [];

        foreach ($advisors as $advisorId => $advisor) {
            if ($advisor instanceof Aop\PointcutAdvisor) {
                $pointcut = $advisor->getPointcut();
                $isFunctionAdvisor = $pointcut->getKind() & Aop\PointFilter::KIND_FUNCTION;
                if ($isFunctionAdvisor && $pointcut->getClassFilter()->matches($namespace)) {
                    $advices[] = $this->getFunctionAdvicesFromAdvisor($namespace, $advisor, $advisorId, $pointcut);
                }
            }
        }

        if (count($advices) > 0) {
            $advices = array_merge_recursive(...$advices);
        }

        return $advices;
    }
public function getAdvicesForFunctions ( ReflectionFileNamespace $ namespace , array $ advisors ) : array { if ( ! $ this -> isInterceptFunctions ) { return [ ] ; } $ advices = [ ] ; foreach ( $ advisors as $ advisorId => $ advisor ) { if ( $ advisor instanceof Aop \ PointcutAdvisor ) { $ pointcut = $ advisor -> getPointcut ( ) ; $ isFunctionAdvisor = $ pointcut -> getKind ( ) & Aop \ PointFilter :: KIND_FUNCTION ; if ( $ isFunctionAdvisor && $ pointcut -> getClassFilter ( ) -> matches ( $ namespace ) ) { $ advices [ ] = $ this -> getFunctionAdvicesFromAdvisor ( $ namespace , $ advisor , $ advisorId , $ pointcut ) ; } } } if ( count ( $ advices ) > 0 ) { $ advices = array_merge_recursive ( ... $ advices ) ; } return $ advices ; }
Returns list of function advices for namespace

@param Aop\Advisor[] $advisors List of advisor to match

@return Aop\Advice[] List of advices for class
Returns list of function advices for namespace