src/Database/Migrator.php
/**
	 * Initializes batches from schema records.
	 *
	 * @return void
	 */
Initializes batches from schema records.
@return void
Initializes batches from schema records . @return void
private function initBatches() {
		$batches = array();
		foreach ($this->schemaRecords as $key => $record) {
			if (array_key_exists($key, $this->migrations)) {
				$migration = $this->migrations[$key];
				$batchNumber = $record->batch;
				if (!isset($batches[$batchNumber])) {
					$batches[$batchNumber] = array();
				}
				$batches[$batchNumber][] = $migration;
			}
		}
		ksort($batches);
		$this->batches = array();
		foreach ($batches as $batchNumber => $migrations) {
			$this->batches[] = new MigrationBatch($this, $batchNumber, $migrations);
		}
	}
private function initBatches ( ) { $ batches = array ( ) ; foreach ( $ this -> schemaRecords as $ key => $ record ) { if ( array_key_exists ( $ key , $ this -> migrations ) ) { $ migration = $ this -> migrations [ $ key ] ; $ batchNumber = $ record -> batch ; if ( ! isset ( $ batches [ $ batchNumber ] ) ) { $ batches [ $ batchNumber ] = array ( ) ; } $ batches [ $ batchNumber ] [ ] = $ migration ; } } ksort ( $ batches ) ; $ this -> batches = array ( ) ; foreach ( $ batches as $ batchNumber => $ migrations ) { $ this -> batches [ ] = new MigrationBatch ( $ this , $ batchNumber , $ migrations ) ; } }
Initializes batches from schema records.
Initializes batches from schema records .