source/Spiral/ORM/ORM.php
public function schemaBuilder(bool $locate = true): SchemaBuilder
    {
        /**
         * @var SchemaBuilder $builder
         */
        $builder = $this->getFactory()->make(SchemaBuilder::class, ['manager' => $this->manager]);

        if ($locate) {
            foreach ($this->locator->locateSchemas() as $schema) {
                $builder->addSchema($schema);
            }

            foreach ($this->locator->locateSources() as $class => $source) {
                $builder->addSource($class, $source);
            }
        }

        return $builder;
    }
public function schemaBuilder(bool $locate = true): SchemaBuilder
    {
        /**
         * @var SchemaBuilder $builder
         */
        $builder = $this->getFactory()->make(SchemaBuilder::class, ['manager' => $this->manager]);

        if ($locate) {
            foreach ($this->locator->locateSchemas() as $schema) {
                $builder->addSchema($schema);
            }

            foreach ($this->locator->locateSources() as $class => $source) {
                $builder->addSource($class, $source);
            }
        }

        return $builder;
    }
public function schemaBuilder ( bool $ locate = true ) : SchemaBuilder { /**
         * @var SchemaBuilder $builder
         */ $ builder = $ this -> getFactory ( ) -> make ( SchemaBuilder :: class , [ 'manager' => $ this -> manager ] ) ; if ( $ locate ) { foreach ( $ this -> locator -> locateSchemas ( ) as $ schema ) { $ builder -> addSchema ( $ schema ) ; } foreach ( $ this -> locator -> locateSources ( ) as $ class => $ source ) { $ builder -> addSource ( $ class , $ source ) ; } } return $ builder ; }
Create instance of ORM SchemaBuilder.

@param bool $locate Set to true to automatically locate available records and record sources
sources in a project files (based on tokenizer scope).

@return SchemaBuilder

@throws SchemaException
Create instance of ORM SchemaBuilder .