/** * Checks if the given class and method match this pointcut. * Before each match run, reset() must be called to reset the circular references guard. * * @param string $className Class to check against * @param string $methodName Method to check against * @param string $methodDeclaringClassName Name of the class the method was originally declared in * @param mixed $pointcutQueryIdentifier Some identifier for this query - must at least differ from a previous identifier. Used for circular reference detection. * @return boolean TRUE if class and method match this point cut, otherwise FALSE * @throws \TYPO3\Flow\Aop\Exception\CircularPointcutReferenceException if a circular pointcut reference was detected */ public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier) { if ($this->pointcutQueryIdentifier === $pointcutQueryIdentifier) { $this->recursionLevel++; if ($this->recursionLevel > self::MAXIMUM_RECURSIONS) { throw new \TYPO3\Flow\Aop\Exception\CircularPointcutReferenceException('Circular pointcut reference detected in ' . $this->aspectClassName . '->' . $this->pointcutMethodName . ', too many recursions (Query identifier: ' . $pointcutQueryIdentifier . ').', 1172416172); } } else { $this->pointcutQueryIdentifier = $pointcutQueryIdentifier; $this->recursionLevel = 0; } return $this->pointcutFilterComposite->matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier); }