Searches for classes in the given AST

@return array|ReflectionClass[]
189040
private function findClasses()
    {
        $classes       = array();
        $namespaceName = $this->getName();
        // classes can be only top-level nodes in the namespace, so we can scan them directly
        foreach ($this->namespaceNode->stmts as $namespaceLevelNode) {
            if ($namespaceLevelNode instanceof ClassLike) {
                $classShortName = $namespaceLevelNode->name->toString();
                $className = $namespaceName ? $namespaceName .'\\' . $classShortName : $classShortName;

                $namespaceLevelNode->setAttribute('fileName', $this->fileName);
                $classes[$className] = new ReflectionClass($className, $namespaceLevelNode);
            }
        }

        return $classes;
    }
1172985
private function _index_classes()
    {
        $ix  = array();
        $aix = $this->attr_idx;
        foreach ($this->attribs as $aid => &$a) {
            if (!empty($a['class'])) {
                $cl = $a['class'];
                if (!is_array($cl)) {
                    $cl = preg_split('|\\s+|', trim($cl));
                }
                foreach ($cl as $cl) {
                    if (isset($ix[$cl])) {
                        if (!is_array($ix[$cl])) {
                            $ix[$cl] = array($ix[$cl] => $this->attr_idx[$ix[$cl]]);
                        }

                        $ix[$cl][$aid] = $this->attr_idx[$aid];
                    } else {
                        $ix[$cl] = $aid;
                    }
                }
            }
        }

        return $this->class_idx = $ix;
    }
1124919
public static function getAllChildClasses($class): array
    {
        $type = gettype($class);
        $className = '';

        /* If input an object */
        if ($type == 'object') {
            $className = get_class($class);
        }

        /* If input a string */
        elseif ($type == 'string') {
            $className = $class;
        }

        $classes = [];

        /* Go through all classes */
        foreach (get_declared_classes() as $class) {
            if (is_subclass_of($class, $className)) {
                $classes[] = $class;
            }
        }

        return $classes;
    }
1032842
public function getClassPropertyNames($className)
    {
        if (!isset($this->reflectedClassNames[$className])) {
            $this->reflectClass($className);
        }
        return isset($this->classPropertyNames[$className]) ? $this->classPropertyNames[$className] : [];
    }
1250377
protected function getClassFiles()
    {
        $app = $this->laravel;

        $core = $app['config']->get('optimizer.core');

        $files = array_merge($core, $app['config']->get('compile.files', []));

        foreach ($app['config']->get('compile.providers', []) as $provider) {
            $files = array_merge($files, forward_static_call([$provider, 'compiles']));
        }

        return array_filter(array_map('realpath', $files));
    }
509025
final public static function all() : array
    {
        static $all = null;

        if ($all === null) {
            foreach ((new \ReflectionClass(get_called_class()))->getConstants() as $constant) {
                $all[] = new static($constant);
            }
        }

        return $all;
    }
1144979
protected function classes()
    {
        list($items, $pattern) = array(array(), '/\\.[^.\\s]{3,4}$/');

        $files = glob($this->commands . '/*.php');

        $path = strlen($this->commands . DIRECTORY_SEPARATOR);

        foreach ((array) $files as $file) {
            $substring = substr($file, $path);

            $class = preg_replace($pattern, '', $substring);

            $class = $this->namespace . '\\' . $class;

            $reflection = new \ReflectionClass($class);

            $reflection->isAbstract() || $items[] = $class;
        }

        return $items;
    }
172279
public function getClassAnnotations()
    {
        $reflector = new ReflectionClass($this->className);
        $doc = $reflector->getDocComment();
        if (!$doc) {
            return;
        }

        $annotations = [];
        foreach ($this->filteringList as $filter) {
            preg_match_all('#@' . $filter . '(.*?)\n#s', $doc, $annotation);
            if (count($annotation[1]) > 0) {
                $annotations[$filter] = $annotation[1];
            }
        }
        $this->annotationObject->mergeClassAnnotations($annotations);
    }
537127
protected function getClassMethods(\ReflectionClass $refClass)
    {
        $methods = [];
        foreach ($refClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
            $methods[$method->name] = $method;
        }

        return $methods;
    }
1270168
public function getAll(): array
    {
        return \array_merge(
            $this->interfaces,
            $this->traits,
            $this->abstractClasses,
            $this->classes
        );
    }
954982
public function getMigrationsClasses()
    {
        $appFiles = $this->getMigrationsFiles();
        $classes = [];

        /* @var $component AppInterface */
        foreach ($appFiles as $appName => $migrationFiles) {
            $component = $this->orm->getComponent($appName);
            foreach ($migrationFiles as $migrationFile) {
                $className = ClassHelper::getClassFromFile($migrationFile);
                $foundClass = ClassHelper::classExists(
                    $className,
                    $component->getNamespace()
                );
                if (!$foundClass) {
                    throw new ClassNotFoundException(
                        sprintf(
                            'The class [ %2$s\\%1$s or \\%1$s ] '.
                            'could not be located',
                            $className,
                            $component->getNamespace()
                        )
                    );
                }
                $classes[$appName][] = $foundClass;
            }
        }

        return $classes;
    }
788848
public function getClassMethods()
    {
        if (empty($this->_methods)) {
            $methods = $this->_getReflection()->getMethods();
            foreach ($methods as $method) {
                $this->_methods[] = $method->getName();
            }
        }
        return $this->_methods;
    }
454613
public function getAllClassNames(): array
    {
        $auditEntityRepository = $this->getAuditObjectManager()
            ->getRepository('ZF\Doctrine\Audit\Entity\AuditEntity');

        $classNames = [];
        foreach ($this->getJoinEntityConfigCollection() as $className => $config) {
            $classNames[] = $auditEntityRepository->generateClassName($className);
        }

        return $classNames;
    }
68504
public function getClassAndMethodNamesForCalling(): array
    {
        $domain = $this->consoleInput->getDomainName();
        $action = $this->consoleInput->getActionName();

        $className = self::getFQDNClass($domain);

        return [$className, $domain, $action];
    }
245864
public static List<SClassDefinition> getClasses(List<INode> ast)
	{
		List<SClassDefinition> classes = new LinkedList<>();

		for (INode n : ast)
		{
			if (n instanceof SClassDefinition)
			{
				classes.add((SClassDefinition) n);
			}
		}

		return classes;
	}
1129172
public function getClassesApi()
    {
        if (!$this->apis->has('classes')) {
            $this->apis->set('classes', new Classes($this));
        }

        return $this->apis->get('classes');
    }
836484
public function classes() {

		$classes = array(
			'toggle-checkbox',
		);

		if ( ! empty( $this->struct['on_icon'] ) ) {
			$this->icons['on'] = $this->struct['on_icon'];
		}

		if ( ! empty( $this->struct['off_icon'] ) ) {
			$this->icons['off'] = $this->struct['off_icon'];
		}

		return $classes;
	}