Example #1
0
 private function classInfo($class_name, $pattern, $is_static, $public_only)
 {
     $reflection = new \Reflection\ReflectionClass($class_name);
     $items = [];
     if (false !== $is_static) {
         foreach ($reflection->getConstants() as $name => $value) {
             if (!$pattern || $this->matchPattern($pattern, $name)) {
                 $items[] = ['word' => $name, 'abbr' => sprintf(" +@ %s %s", $name, $value), 'kind' => 'd', 'icase' => 1];
             }
         }
     }
     $methods = $reflection->getAvailableMethods($is_static, $public_only);
     foreach ($methods as $method) {
         $info = $this->getMethodInfo($method, $pattern);
         if ($info) {
             $items[] = $info;
         }
     }
     $properties = $reflection->getAvailableProperties($is_static, $public_only);
     foreach ($properties as $property) {
         $info = $this->getPropertyInfo($property, $pattern);
         if ($info) {
             $items[] = $info;
         }
     }
     return $items;
 }