コード例 #1
0
 /**
  * Checks if the specified class matches with the class type filter pattern
  *
  * @param string $className Name of the class to check against
  * @param string $methodName Name of the method - not used here
  * @param string $methodDeclaringClassName Name of the class the method was originally declared in - not used here
  * @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)
 {
     $matches = FALSE;
     foreach ($this->reflectionService->getInterfaceNamesImplementedByClass($className) as $interfaceName) {
         $matchResult = @preg_match('/^' . $this->classTypeFilterExpression . '$/', $interfaceName);
         if ($matchResult === FALSE) {
             throw new \F3\FLOW3\AOP\Exception('Error in regular expression "' . $this->classTypeFilterExpression . '" in pointcut class type filter', 1172483343);
         }
         if ($matchResult === 1) {
             $matches = TRUE;
         }
     }
     return $matches;
 }