LazyRecord\Schema\SchemaGenerator::setForceUpdate PHP Метод

setForceUpdate() публичный Метод

public setForceUpdate ( $force = true )
    public function setForceUpdate($force = true)
    {
        $this->forceUpdate = $force;
    }

Usage Example

Пример #1
0
 public function execute()
 {
     $logger = $this->getLogger();
     $config = $this->getConfigLoader();
     $this->logger->debug('Finding schemas...');
     $classes = $this->findSchemasByArguments(func_get_args());
     SchemaUtils::printSchemaClasses($classes, $this->logger);
     $this->logger->debug("Initializing schema generator...");
     $generator = new SchemaGenerator($config, $this->logger);
     if ($this->options->force) {
         $generator->setForceUpdate(true);
     }
     $classMap = $generator->generate($classes, $this->options->force);
     /*
     foreach( $classMap as $class => $file ) {
         $path = $file;
         if ( strpos( $path , getcwd() ) === 0 ) {
             $path = substr( $path , strlen(getcwd()) + 1 );
         }
         $logger->info($path);
         // $logger->info(sprintf("%-32s",ltrim($class,'\\')) . " => $path",1);
     }
     */
     $logger->info('Done');
 }
All Usage Examples Of LazyRecord\Schema\SchemaGenerator::setForceUpdate