/** * Checks if the specified method matches against the method name * expression. * * @param string $className Ignored in this pointcut filter * @param string $methodName Name of the method to match agains * @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 the class matches, otherwise FALSE * @author Robert Lemke <*****@*****.**> */ public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier) { $matchResult = preg_match('/^' . $this->methodNameFilterExpression . '$/', $methodName); if ($matchResult === FALSE) { throw new \F3\FLOW3\AOP\Exception('Error in regular expression', 1168876915); } $methodNameMatches = $matchResult === 1; switch ($this->methodVisibility) { case 'public': $visibilityMatches = $this->reflectionService->isMethodPublic($methodDeclaringClassName, $methodName); break; case 'protected': $visibilityMatches = $this->reflectionService->isMethodProtected($methodDeclaringClassName, $methodName); break; default: $visibilityMatches = TRUE; } $isNotFinal = $methodDeclaringClassName === NULL || !$this->reflectionService->isMethodFinal($methodDeclaringClassName, $methodName); return $methodNameMatches && $visibilityMatches && $isNotFinal; }