示例#1
0
 public function __construct($name)
 {
     $this->info = hphp_get_function_info($name);
     if (empty($this->info)) {
         throw new ReflectionException("Function {$name} does not exist");
     }
 }
示例#2
0
 public function __construct($name)
 {
     if ($name instanceof Closure) {
         $this->info = hphp_get_closure_info($name);
     } else {
         $this->info = hphp_get_function_info($name);
         if (empty($this->info)) {
             throw new ReflectionException("Function {$name} does not exist");
         }
     }
 }