printSchemaClasses() public static method

public static printSchemaClasses ( array $classes, CLIFramework\Logger $logger = null )
$classes array
$logger CLIFramework\Logger
Exemplo n.º 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');
 }
Exemplo n.º 2
0
 public function execute()
 {
     $options = $this->options;
     $logger = $this->logger;
     $classes = $this->findSchemasByArguments(func_get_args());
     SchemaUtils::printSchemaClasses($classes, $this->logger);
     $collection = new SchemaCollection($classes);
     $collection = $collection->evaluate();
     $seedBuilder = new SeedBuilder($this->getConfigLoader(), $this->logger);
     $seedBuilder->build($collection);
     $this->logger->info('Done');
 }