Return a list of class guessed.

@param $registry

@return Context
961413
public function createContext(Registry $registry)
    {
        // List of schemas can evolve, but we don't want to generate new schema dynamically added, so we "clone" the array
        // to have a fixed list of schemas
        $schemas = array_values($registry->getSchemas());

        /** @var Schema $schema */
        foreach ($schemas as $schema) {
            $jsonSchema = $this->serializer->deserialize(file_get_contents($schema->getOrigin()), 'Joli\Jane\Model\JsonSchema', 'json', [
                'document-origin' => $schema->getOrigin()
            ]);

            $this->chainGuesser->guessClass($jsonSchema, $schema->getRootName(), $schema->getOrigin() . '#', $registry);
        }

        foreach ($registry->getSchemas() as $schema) {
            foreach ($schema->getClasses() as $class) {
                $properties = $this->chainGuesser->guessProperties($class->getObject(), $schema->getRootName(), $class->getReference(), $registry);

                foreach ($properties as $property) {
                    $property->setType($this->chainGuesser->guessType($property->getObject(), $property->getName(), $property->getReference(), $registry));
                }

                $class->setProperties($properties);
            }
        }


        return new Context($registry);
    }
1113439
private function getClassInfo($defClass) {
		if (is_object($defClass)) {
			if ($defClass instanceof ReflectionClass) {
				$className = $defClass->getName();
				$refClass = $defClass;
			} else {
				$className = get_class($defClass);
				$refClass = new ReflectionClass($className);
			}
		} else {
			$className = $defClass;
			$refClass = new ReflectionClass($className);
		}

		return [ $className, $refClass ];
	}
667118
private function getRegistry($nonce)
    {
        if (null === $registry = $this->registryRepository->findOneBy(['key' => $nonce, 'scope' => 'SECURITY.NONCE'])) {
            $registry = new Registry();
            $registry->setKey($nonce)->setScope('SECURITY.NONCE');
        }

        return $registry;
    }
679959
protected function occurrence(ReturnFile\Registry $registry)
    {
        $occurrence = parent::occurrence($registry);

        $errors = array_intersect_key(
            $this->config['error_table'],
            array_filter(str_split($registry->error_table))
        );

        return (empty($errors))
            ? $occurrence
            : implode("\n- ", array_merge([$occurrence ?? 'Erros:'], $errors));
    }
242194
protected function getClassFromOperation($name, Operation $operation = null, $reference, $registry)
    {
        if (null === $operation) {
            return;
        }

        if ($operation->getParameters()) {
            foreach ($operation->getParameters() as $key => $parameter) {
                if ($parameter instanceof BodyParameter) {
                    $this->chainGuesser->guessClass($parameter->getSchema(), $name . 'Body', $reference . '/parameters/' . $key, $registry);
                }
            }
        }

        if ($operation->getRequestBody() && $operation->getRequestBody()->getContent()) {
            foreach ($operation->getRequestBody()->getContent() as $contentType => $content) {
                $this->chainGuesser->guessClass($content->getSchema(), $name . 'Body', $reference . '/requestBody/content/' . $contentType . '/schema', $registry);
            }
        }

        if ($operation->getResponses()) {
            foreach ($operation->getResponses() as $status => $response) {
                if ($response instanceof Response && $response->getContent()) {
                    foreach ($response->getContent() as $contentType => $content) {
                        $this->chainGuesser->guessClass($content->getSchema(), $name . 'Response' . $status, $reference . '/responses/' . $status . '/content/' . $contentType . '/schema', $registry);
                    }
                }
            }
        }
    }
511809
public function getAllClassNames(): array
    {
        $auditEntityRepository = $this->getAuditObjectManager()
            ->getRepository(Entity\AuditEntity::class);

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

        return $classNames;
    }
643268
public function getAdminClasses()
    {
        $classCollection = [];

        if (!defined('static::ADMIN_KEY')) {
            return $classCollection;
        }

        $classCollection = $this->getSubAdminClasses(\Flare::config(static::ADMIN_KEY));

        return $classCollection;
    }
507594
def class_name(self):
    """"""
    if not self._registry_key and self._registry:
      self._GetKeyFromRegistry()

    if not self._registry_key:
      return None

    return self._registry_key.class_name
946776
protected function _getClassIndices($class)
    {
        $indices = array ();
        if ($class == self::CLASS_LETTER) {
            $indices = array_merge(
                $this->_getClassIndices(self::CLASS_LOWER),
                $this->_getClassIndices(self::CLASS_UPPER)
            );
            sort($indices);
        } else {
            if (isset ($this->_tokenIndices[$class])) {
                $indices = $this->_tokenIndices[$class];
            }
        }

        return $indices;
    }
154901
protected function parseTitle()
    {
        if (($registeredName = array_search($this->className, $this->defaultContextSettings)) !== false) {
            return $registeredName;
        } elseif (preg_match('/\\\\([^\\\\]*)Helper$/', $this->className, $matches)) {
            return $matches[1];
        }

        return $this->className;
    }
1098983
public function getContext(string $class): Context
    {
        if (!isset($this->contexts[$class])) {
            throw new ContextNotFoundException(sprintf(
                '`%s` context is not found in the suite environment. Have you registered it?',
                $class
            ), $class);
        }

        return $this->contexts[$class];
    }
742123
public function getEntityIdentifiers($class)
    {
        $registry = $this->getService('application.registry', array('key' => $this->getIdentifier()));

        if (!$registry->offsetExists($class.'-identifiers')) {
            $path = ANPATH_ROOT.DS.'components'.DS.'com_'.$this->getIdentifier()->package.DS.'domains'.DS.'entities';

            $identifiers = array();

            if (file_exists($path)) {

                //scandir without . and .. hiident directories
                $files = array_values(preg_grep('/^([^.])/', scandir($path)));

                foreach ($files as $file) {
                    $name = explode('.', basename($file));
                    $name = $name[0];
                    $identifier = clone $this->getIdentifier();
                    $identifier->path = array('domain','entity');
                    $identifier->name = $name;

                    try {
                        if (is($identifier->classname, $class)) {
                            $identifiers[] = $identifier;
                        }
                    } catch (Exception $e) {
                    }
                }
            }

            $registry->offsetSet($class.'-identifiers', $identifiers);
        }

        $identifiers = $registry->offsetGet($class.'-identifiers');

        return $identifiers;
    }
1110697
public function getAll($context)
    {
        $category = $this->getCategory();

        $entry = $this->getDefault();

        $categoryConfig = $this->getCategoryConfig($category);

        if (isset($categoryConfig[$context])) {
            $actual = $categoryConfig[$context];
            $entry = array_merge($entry, $actual);
        }

        return $entry;
    }
837979
public static function fromRegistry(ManagerRegistry $registry)
    {
        $drivers = array();
        foreach ($registry->getManagers() as $manager) {
            $drivers[] = self::fromManager($manager);
        }

        return new DriverChain($drivers);
    }
165966
public function finish(\Caridea\Validate\Registry $registry): \Caridea\Validate\Rule
    {
        if ($this->validator instanceof \Caridea\Validate\Validator) {
            return $this;
        } else {
            $rule = clone $this;
            $builder = $registry->builder();
            switch ($this->operator) {
                case "nested_object":
                case "list_objects":
                    $rule->validator = $builder->build($this->validator);
                    return $rule;
                case "list":
                    $rule->validator = $builder->build((object)['entry' => $this->validator]);
                    return $rule;
                case "list_different_objects":
                case "variable_object":
                    $validators = [];
                    foreach ($this->validator as $value => $ruleset) {
                        $validators[$value] = $builder->build($ruleset);
                    }
                    $rule->validator = new \Caridea\Validate\SwitchValidator($this->field, $validators);
                    return $rule;
            }
        }
    }
643935
public function getVatClasses()
    {
        $result = array();
        /** @var \hikashopCategoryClass $categoryClass */
        $categoryClass = hikashop_get('class.category');
        /** @var \stdClass $category */
        $category = $categoryClass->get('tax');
        $taxClasses = $categoryClass->getChildren((int) $category->category_id, true, array(), '', 0, 0);
        foreach ($taxClasses as $taxClass) {
            /** @var \stdClass $category */
            $result[$taxClass->category_namekey] = $taxClass->category_name;
        }
        return $result;
    }
1010556
protected function getClassesToScan()
    {
        $classes = [];

        foreach ($this->scan as $class) {
            try {
                $classes[] = new ReflectionClass($class);
            } catch (ReflectionException $e) {
                //
            }
        }

        return $classes;
    }