protected function generatePointcutPointcut(array $pointcutNames, Aspect $aspect)
    {
        // there might be several pointcuts
        // we have to look them up within the pointcuts we got here and the ones we already have in our register
        $pointcutFactory = new PointcutFactory();
        $referencedPointcuts = array();
        $pointcutExpression = array();
        foreach ($pointcutNames as $pointcutName) {
            $pointcutName = (string) $pointcutName;
            $referenceCount = count($referencedPointcuts);

            // check if we recently parsed the referenced pointcut
            if ($pointcut = $aspect->getPointcuts()->get($pointcutName)) {
                $referencedPointcuts[] = $pointcut;
            } else {
                // or did we already know of it?
                $referencedPointcuts = array_merge($referencedPointcuts, $this->getAspectRegister()->lookupPointcuts($pointcutName));
            }

            // build up the expression string for the PointcutPointcut instance
            if ($referenceCount < count($referencedPointcuts)) {
                $pointcutExpression[] = $pointcutName;
            }
        }

        /** @var \AppserverIo\Doppelgaenger\Entities\Pointcuts\PointcutPointcut $pointcutPointcut */
        $pointcutPointcut = $pointcutFactory->getInstance(
            PointcutPointcut::TYPE . '(' . implode(PointcutPointcut::EXPRESSION_CONNECTOR, $pointcutExpression) . ')'
        );
        $pointcutPointcut->setReferencedPointcuts($referencedPointcuts);

        return $pointcutPointcut;
    }
protected function generatePointcutPointcut(array $pointcutNames, Aspect $aspect)
    {
        // there might be several pointcuts
        // we have to look them up within the pointcuts we got here and the ones we already have in our register
        $pointcutFactory = new PointcutFactory();
        $referencedPointcuts = array();
        $pointcutExpression = array();
        foreach ($pointcutNames as $pointcutName) {
            $pointcutName = (string) $pointcutName;
            $referenceCount = count($referencedPointcuts);

            // check if we recently parsed the referenced pointcut
            if ($pointcut = $aspect->getPointcuts()->get($pointcutName)) {
                $referencedPointcuts[] = $pointcut;
            } else {
                // or did we already know of it?
                $referencedPointcuts = array_merge($referencedPointcuts, $this->getAspectRegister()->lookupPointcuts($pointcutName));
            }

            // build up the expression string for the PointcutPointcut instance
            if ($referenceCount < count($referencedPointcuts)) {
                $pointcutExpression[] = $pointcutName;
            }
        }

        /** @var \AppserverIo\Doppelgaenger\Entities\Pointcuts\PointcutPointcut $pointcutPointcut */
        $pointcutPointcut = $pointcutFactory->getInstance(
            PointcutPointcut::TYPE . '(' . implode(PointcutPointcut::EXPRESSION_CONNECTOR, $pointcutExpression) . ')'
        );
        $pointcutPointcut->setReferencedPointcuts($referencedPointcuts);

        return $pointcutPointcut;
    }
protected function generatePointcutPointcut ( array $ pointcutNames , Aspect $ aspect ) { // there might be several pointcuts // we have to look them up within the pointcuts we got here and the ones we already have in our register $ pointcutFactory = new PointcutFactory ( ) ; $ referencedPointcuts = array ( ) ; $ pointcutExpression = array ( ) ; foreach ( $ pointcutNames as $ pointcutName ) { $ pointcutName = ( string ) $ pointcutName ; $ referenceCount = count ( $ referencedPointcuts ) ; // check if we recently parsed the referenced pointcut if ( $ pointcut = $ aspect -> getPointcuts ( ) -> get ( $ pointcutName ) ) { $ referencedPointcuts [ ] = $ pointcut ; } else { // or did we already know of it? $ referencedPointcuts = array_merge ( $ referencedPointcuts , $ this -> getAspectRegister ( ) -> lookupPointcuts ( $ pointcutName ) ) ; } // build up the expression string for the PointcutPointcut instance if ( $ referenceCount < count ( $ referencedPointcuts ) ) { $ pointcutExpression [ ] = $ pointcutName ; } } /** @var \AppserverIo\Doppelgaenger\Entities\Pointcuts\PointcutPointcut $pointcutPointcut */ $ pointcutPointcut = $ pointcutFactory -> getInstance ( PointcutPointcut :: TYPE . '(' . implode ( PointcutPointcut :: EXPRESSION_CONNECTOR , $ pointcutExpression ) . ')' ) ; $ pointcutPointcut -> setReferencedPointcuts ( $ referencedPointcuts ) ; return $ pointcutPointcut ; }
Will create a PointcutPointcut instance referencing all concrete pointcuts configured for a certain advice.
Needs a list of these pointcuts

@param array                                                  $pointcutNames List of names of referenced pointcuts
@param \AppserverIo\Doppelgaenger\Entities\Definitions\Aspect $aspect        The aspect to which the advice belongs

@return \AppserverIo\Doppelgaenger\Entities\Pointcuts\PointcutPointcut
Will create a PointcutPointcut instance referencing all concrete pointcuts configured for a certain advice . Needs a list of these pointcuts