示例#1
0
 /**
  * @param   Garp_Spawn_Model_Abstract       $model
  */
 public function __construct(Garp_Spawn_Model_Abstract $model, Garp_Cli_Ui_Protocol $feedback)
 {
     $tableFactory = new Garp_Spawn_MySql_Table_Factory($model);
     $configTable = $tableFactory->produceConfigTable();
     $liveTable = $tableFactory->produceLiveTable();
     $this->setSource($configTable);
     $this->setTarget($liveTable);
     $this->setModel($model);
     $this->setFeedback($feedback);
 }
示例#2
0
 public function __construct(Garp_Spawn_Model_Base $model, Garp_Cli_Ui_Protocol $feedback = null)
 {
     $this->setFeedback($feedback);
     $tableFactory = new Garp_Spawn_MySql_Table_Factory($model);
     $this->setModel($model);
     $source = $tableFactory->produceConfigTable();
     $target = $tableFactory->produceLiveTable();
     $this->setSource($source);
     $this->setTarget($target);
     $this->_createTableIfNotExists();
     $sql = $this->_renderContentMigrationSql();
     $this->_executeSql($sql);
 }