Exemplo n.º 1
0
 protected function initializeForCommand()
 {
     switch ($this->command) {
         case 'migrate':
             $this->migrateData();
             return 0;
             break;
         case 'summary':
             $this->migrateData(true);
             return 0;
             break;
         case 'update':
             KurogoStats::exportStatsData();
             return 0;
             break;
         case 'updateFromShards':
             if ($timestamp = $this->getArg('timestamp')) {
                 KurogoStats::updateSummaryFromShards($timestamp);
                 return 0;
             }
             $this->out('timestamp parameter is required');
             return 10;
             break;
         default:
             $this->invalidCommand();
             break;
     }
 }