LazyRecord\Schema\SchemaFinder::setPaths PHP Method

setPaths() public method

public setPaths ( array $paths )
$paths array
    public function setPaths(array $paths)
    {
        $this->paths = $paths;
    }

Usage Example

 public function execute($taskName)
 {
     $dsId = $this->getCurrentDataSourceId();
     $config = $this->getConfigLoader(true);
     $this->logger->info('Loading schema objects...');
     $finder = new SchemaFinder();
     $finder->setPaths($config->getSchemaPaths() ?: array());
     $finder->find();
     $generator = new MigrationGenerator($this->logger, 'db/migrations');
     $this->logger->info('Creating migration script from diff');
     $schemaMap = SchemaLoader::loadSchemaTableMap();
     list($class, $path) = $generator->generateWithDiff($taskName, $dsId, $schemaMap);
     $this->logger->info("Migration script is generated: {$path}");
 }
All Usage Examples Of LazyRecord\Schema\SchemaFinder::setPaths