private function GetMethods()
 {
     $methods = get_defined_functions();
     $methods = $methods["user"];
     $ajaxMethods = array();
     if (is_array($methods)) {
         $ref = NULL;
         foreach ($methods as $method) {
             $ref = new AnnotationFunction($method);
             if ($ref->hasAnnotation("AjaxMethod")) {
                 if ($ref->hasAnnotationValue("AjaxMethod", "Async", TRUE)) {
                     $ajaxMethods[$ref->getName()] = TRUE;
                 } else {
                     $ajaxMethods[$ref->getName()] = FALSE;
                 }
             }
         }
     }
     if (count($ajaxMethods) === 0) {
         $ajaxMethods = NULL;
     }
     return $ajaxMethods;
 }
Esempio n. 2
0
 private function FindHandler()
 {
     $methods = get_defined_functions();
     $methods = $methods["user"];
     $handler = NULL;
     if (is_array($methods)) {
         $ref = NULL;
         foreach ($methods as $method) {
             $ref = new AnnotationFunction($method);
             if ($ref->hasAnnotation("AjaxHandler")) {
                 $ajaxId = $ref->getAnnotation("AjaxHandler");
                 if (is_array($ajaxId)) {
                     $ajaxId = $ajaxId[0];
                 }
                 if ($ajaxId != NULL && trim($ajaxId) == $this->Id) {
                     $handler = $ref->getName();
                     break;
                 }
             }
         }
     }
     return $handler;
 }
 private function findHandlers()
 {
     $methods = get_defined_functions();
     $methods = $methods["user"];
     $handlers = array();
     if (is_array($methods)) {
         $ref = NULL;
         foreach ($methods as $method) {
             $ref = new AnnotationFunction($method);
             if ($ref->hasAnnotation("AjaxHandler")) {
                 $ajaxId = $ref->getAnnotation("AjaxHandler");
                 if (is_array($ajaxId)) {
                     $ajaxId = $ajaxId[0];
                 }
                 if ($ajaxId != NULL && trim($ajaxId) != "") {
                     $handlers[$ajaxId] = $ref->getName();
                 }
             }
         }
     }
     if (count($handlers) === 0) {
         $handlers = NULL;
     }
     return $handlers;
 }