/** * Проверка на наличие одинаковых значенией в фильтрах class, nclass и function, nfunction * * @param Miaox_Aop_Pointcut $pointcut * @param string $className имя класса, для class, nclass * @param string $functionName имя функции, для function, nfunction * @exception Miaox_Aop_Exception */ protected function _checkForAttrMatching(&$pointcut, $className, $functionName) { // Need to check if there are a matching between class and nclass. Also, nfunction and function if ($className && $pointcut->hasClassName($className) && $pointcut->hasNotInClassName($className)) { throw new Miaox_Aop_Exception("<b>[ Aspect Error ]:</b> Cannot define a pointcut with the same class name [<b>" . $className . "</b>] in \"class\" and \"nclass\" attribute"); } else { if ($functionName && $pointcut->hasFunctionName($functionName) && $pointcut->hasNotInFunctionName($functionName)) { throw new Miaox_Aop_Exception("<b>[ Aspect Error ]:</b> Cannot define a pointcut with the same function name [<b>" . $functionName . "</b>] in \"function\" and \"nfunction\" attribute"); } } // Does nothing if no match is found! }