예제 #1
0
 /**
  * Run a single plugin to check for a match
  * 
  * @param type $plugin
  * @param type $btx
  * @param type $context
  */
 protected function matchPlugin(CRM_Banking_PluginModel_Matcher $plugin, CRM_Banking_Matcher_Context $context)
 {
     $btx = $context->btx;
     // match() returns an instance of CRM_Banking_Matcher_Suggestion
     $suggestions = $plugin->match($btx, $context);
     if ($suggestions !== null) {
         // handle the possibility to get multiple matches in return
         if (!is_array($suggestions)) {
             $suggestions = array($suggestions->probability => $suggestions);
         }
     }
     return true;
 }