Generates classes in the "classes" field

@param string $file_path
965515
public function generate(string $file_path){
		$namespace_name = $this->namespaceModel();

		$api = Yaml::parseFile($file_path);

		$namespace = new PhpNamespace($namespace_name);

		foreach ($api['definitions'] as $class_name => $class_details){

			$class = new ClassType($class_name, $namespace);
			$class->setExtends("$namespace_name\\".self::MODEL_CLASS_NAME);
			$class->addComment("** This file was generated automatically, you might want to avoid editing it **");

			if (!empty($class_details['description'])){
				$class->addComment("\n".$class_details['description']);
			}

			if (isset($class_details['allOf'])){
				$parent_class_name = $this->typeFromRef($class_details['allOf'][0]);
				$class->setExtends("$namespace_name\\$parent_class_name");
				$properties = $class_details['allOf'][1]['properties'];
			}
			else {
				$properties = $class_details['properties'];
			}

			$this->classProperties($properties, $class);

			$this->classes[$class_name] = $class;
		}
	}
461077
def generate_class_list(classes, modules, from, html_file, class_dir)
      if from.is_module? and !@modules.has_key?(from.name)
        k = HTMLPuppetModule.new(from, html_file, class_dir, @options)
        classes << k
        @modules[from.name] = k
        modules << @modules[from.name]
      elsif from.is_module?
        modules << @modules[from.name]
      elsif !from.is_module?
        k = HTMLPuppetClass.new(from, html_file, class_dir, @options)
        classes << k
      end
      from.each_classmodule do |mod|
        generate_class_list(classes, modules, mod, html_file, class_dir)
      end
    end
1320114
protected static function selectClasses(string $path, string $classOrInterface): iterable
    {
        $selectedFiles = [];

        $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_PATHNAME;
        foreach (new GlobIterator($path, $flags) as $filePath) {
            if (is_file($filePath) === true) {
                $filePath = realpath($filePath);
                try {
                    /** @noinspection PhpIncludeInspection */
                    require_once $filePath;
                } catch (Exception $ex) {
                    // Files might have syntax errors and etc.
                    // For the purposes of this method it doesn't matter so just skip it.
                    continue;
                }
                $selectedFiles[$filePath] = true;
            }
        }

        foreach (get_declared_classes() as $class) {
            // if class actually implements requested one and ...
            if ($class === $classOrInterface || static::classInherits($class, $classOrInterface) === true) {
                // ... it was loaded from a file we've selected then...
                $reflectionClass = new ReflectionClass($class);
                if ($reflectionClass->isInstantiable() === true &&
                    ($classFileName = $reflectionClass->getFileName()) !== false &&
                    array_key_exists($classFileName, $selectedFiles) === true
                ) {
                    // ... that's what we need.
                    yield $class;
                }
            }
        }
    }
337288
private function generateClasses()
    {
        foreach($this->ref->getClasses() as $class)
        {
            if($class->isInterface())
            {
                $this->generateInterface($class);
            }
            else if($class->isTrait())
            {
                $this->generateTrait($class);
            }
            else
            {
                $this->generateClass($class);
            }
        }
    }
22498
protected function generateFolders($path)
    {
        if (! $this->files->isDirectory($path)) {
            $this->files->makeDirectory($path, 0755, true, true);
        }

        $this->files->makeDirectory($path .DS .'Language');
        $this->files->makeDirectory($path .DS .'Support');

        // Generate the Language folders.
        $languages = $this->container['config']->get('languages', array());

        foreach (array_keys($languages) as $code) {
            $directory = $path .DS .'Language' .DS .strtoupper($code);

            $this->files->makeDirectory($directory);
        }
    }
591646
public function familiar($file_path)
    {
        $dirs = explode('/', $file_path);
        $new_file_root = array_pop($dirs);
        array_unshift($dirs, reset($this->subDirs));
        
        $file = new static($this->type);
        $file->subDirs = $dirs;
        $file->fileRoot = $new_file_root;
        $file->extension = $this->extension;
        return $file;
    }
789795
function (path) {
    let classes = [];

    let files = fs.readdirSync(path);
    for (let i = 0; i < files.length; i++) {
      let clazz = require(path + '/' + files[i]);
      classes.push(clazz);
    }

    return classes;
  }
407361
private function requireCachedClasses()
    {
        $classPath = $this->cachePath;
        if (is_dir($classPath)) {
            $finder = new Finder();
            $actionManagerFiles = $finder->files()->depth(1)->name('*.php')->in($classPath);
            foreach ($actionManagerFiles as $actionManagerFile) {
                $classFileName = (string)$actionManagerFile;
                $classContents = file_get_contents($classFileName);
                preg_match('/namespace ([\w\\\]+);.*?class ([\w]+).*?{/s', $classContents, $match);
                if (isset($match[1]) && isset($match[2])) {
                    $class = $match[1] . '\\' . $match[2];
                    if (!in_array($class, get_declared_classes())) @require_once $classFileName;
                }
            }
        }
    }
138961
public function setClasspath(Path $classpath)
    {
        if ($this->isReference()) {
            throw $this->tooManyAttributes();
        }
        if ($this->classpath === null) {
            $this->classpath = $classpath;
        } else {
            $this->classpath->append($classpath);
        }
    }
597159
public static function classes_for_folder($folderPath)
    {
        $absFolderPath = Director::getAbsFile($folderPath);
        $classManifest = ClassLoader::inst()->getManifest();
        $classes = $classManifest->getClasses();
        $classNames = $classManifest->getClassNames();

        $matchedClasses = [];
        foreach ($classes as $lowerClass => $compareFilePath) {
            if (stripos($compareFilePath, $absFolderPath) === 0) {
                $matchedClasses[$lowerClass] = $classNames[$lowerClass];
            }
        }

        return $matchedClasses;
    }
1216030
public function exhumeClassLikeStorage($fq_classlike_name, $file_path)
    {
        $file_contents = $this->file_provider->getContents($file_path);
        $storage = $this->classlike_storage_provider->exhume($fq_classlike_name, $file_path, $file_contents);

        if ($storage->is_trait) {
            $this->classlikes->addFullyQualifiedTraitName($fq_classlike_name, $file_path);
        } elseif ($storage->is_interface) {
            $this->classlikes->addFullyQualifiedInterfaceName($fq_classlike_name, $file_path);
        } else {
            $this->classlikes->addFullyQualifiedClassName($fq_classlike_name, $file_path);
        }
    }
879303
def get_orm_classes(path):
    """"""
    ret = set()
    try:
        m = importlib.import_module(path)

    except ImportError:
        # we have a classpath
        m, klass = get_objects(path)
        if issubclass(klass, Orm):
            ret.add(klass)

    else:
        ret.update(get_subclasses(m, Orm))

    return ret
1210269
public function markdownLink($file_path, $type = '')
    {

        $array = explode('/', $file_path);
        $dir = $array[0];

        $replace = array('-', '_');

        $url = trim($dir, '.md');
        $display_name = str_replace($replace, ' ', trim($dir, '.md'));

        if (count($array) > 1) {
            $name = trim($array[1], '.md');
            $url = $dir . '?page=' . $name;
            $display_name = str_replace($replace, ' ', $name);
        }

        $link = ($type == 'url') ? '/md/' . $url :
            '<a href="/md/' . $url . '" class="markdown-link">' . $display_name .
            '</a>';
        return $link;

    }
177569
public static function getMagicType($file_path) {
		$file_info = finfo_open(FILEINFO_MIME_TYPE);
		$mime_type = finfo_file($file_info, $file_path);
		finfo_close($file_info);

		// Only return valid types, in order to maintain circular compatibility between methods.
		if (static::hasType($mime_type)) {
			return $mime_type;
		}
	}
434438
public function processFileClasses(array $classes, string $file)
    {
        foreach ($classes as $name => $class) {
            if (is_null($class['docblock'])) {
                $this->errors[] = [
                    'type' => 'class',
                    'file' => $file,
                    'class' => $name,
                    'line' => $class['line'],
                ];
            }
        }
    }
856872
public function findClasses()
    {
        $files = $this->getFiles($this->searchPath);

        // if class are not loaded they will ne be caught by "declared_classes"
        $this->loadFiles($files);

        return $this->identifyClasses();
    }
470625
public function reportTypeStatsForFile($file_path)
    {
        return $this->project_files
            && $this->project_files->allows($file_path)
            && $this->project_files->reportTypeStats($file_path);
    }