예제 #1
0
파일: RuleSet.php 프로젝트: joy2fun/phpvs
 /**
  * @param mixed $data
  * @param string $key
  * @param string $message
  */
 public function handle($data, $key = null, $message = '')
 {
     if (RuleSet::getHandlers() === null) {
         RuleSet::attachHandler(new Handler\Exception());
         // attach a default handler
     }
     foreach (RuleSet::getHandlers() as $handler) {
         call_user_func(array($handler, 'handle'), Rule::instance(), $data, $key, $message);
     }
 }