Exemplo n.º 1
0
 /**
  * Конструктор
  *
  * @param Miaox_Aop_Advice $action
  * @param string|array $class список классов, включаемых в срез
  * @param string|array $function список функций/методов, включаемых в срез
  * @param string|array $auto тип auto pointcuta
  * @param string|array $nclass список классов, НЕ включаемых в срез
  * @param string|array $nfunction список функций/методов, НЕ включаемых в срез
  */
 public function __construct($action, $class, $function, $auto, $nclass, $nfunction)
 {
     parent::__construct($action, $class, $function, $nclass, $nfunction);
     // Defining Auto( s )
     $this->_auto = $this->_extractAr($auto);
 }
Exemplo n.º 2
0
 /**
  * Проверка на наличие одинаковых значенией в фильтрах 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!
 }
Exemplo n.º 3
0
 /**
  * Конструктор
  *
  * @param Miaox_Aop_Advice $action
  * @param string|array $class список классов, включаемых в срез
  * @param string|array $function список функций/методов, включаемых в срез
  * @param string|array $name имя среза
  * @param string|array $nclass список классов, НЕ включаемых в срез
  * @param string|array $nfunction список функций/методов, НЕ включаемых в срез
  */
 public function __construct($action, $class, $function, $name, $nclass, $nfunction)
 {
     parent::__construct($action, $class, $function, $nclass, $nfunction);
     // Defining Name( s )
     $this->_name = $this->_extractAr($name);
 }