source/Spiral/ORM/Schemas/SchemaLocator.php
public function locateSchemas(): array
    {
        if (!$this->container->has(ClassesInterface::class)) {
            return [];
        }

        /**
         * @var ClassesInterface $classes
         */
        $classes = $this->container->get(ClassesInterface::class);

        $schemas = [];
        foreach ($classes->getClasses(RecordEntity::class) as $class) {
            if ($class['abstract']) {
                continue;
            }

            $schemas[] = $this->container->get(FactoryInterface::class)->make(
                RecordSchema::class,
                ['reflection' => new ReflectionEntity($class['name']),]
            );
        }

        return $schemas;
    }
public function locateSchemas(): array
    {
        if (!$this->container->has(ClassesInterface::class)) {
            return [];
        }

        /**
         * @var ClassesInterface $classes
         */
        $classes = $this->container->get(ClassesInterface::class);

        $schemas = [];
        foreach ($classes->getClasses(RecordEntity::class) as $class) {
            if ($class['abstract']) {
                continue;
            }

            $schemas[] = $this->container->get(FactoryInterface::class)->make(
                RecordSchema::class,
                ['reflection' => new ReflectionEntity($class['name']),]
            );
        }

        return $schemas;
    }
public function locateSchemas ( ) : array { if ( ! $ this -> container -> has ( ClassesInterface :: class ) ) { return [ ] ; } /**
         * @var ClassesInterface $classes
         */ $ classes = $ this -> container -> get ( ClassesInterface :: class ) ; $ schemas = [ ] ; foreach ( $ classes -> getClasses ( RecordEntity :: class ) as $ class ) { if ( $ class [ 'abstract' ] ) { continue ; } $ schemas [ ] = $ this -> container -> get ( FactoryInterface :: class ) -> make ( RecordSchema :: class , [ 'reflection' => new ReflectionEntity ( $ class [ 'name' ] ) , ] ) ; } return $ schemas ; }
Locate all available document schemas in a project.

@return SchemaInterface[]
Locate all available document schemas in a project .