PHPCD\PHPCD::classInfo PHP Method

classInfo() private method

private classInfo ( $class_name, $pattern, $is_static, $public_only )
    private function classInfo($class_name, $pattern, $is_static, $public_only)
    {
        try {
            $reflection = new \PHPCD\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;
                }
            }
            $pseudo_items = $this->getPseudoProperties($reflection);
            $items = array_merge($items, $pseudo_items);
            return $items;
        } catch (\ReflectionException $e) {
            $this->logger->debug($e->getMessage());
            return [null, []];
        }
    }