src/controllers/DefaultController.php
public function actionIndex($option = null)
	{
		$fixtures = Yii::createObject(Fixtures::className());
		$option = Question::displayWithQuit('Select operation', ['Export', 'Import'], $option);
		if($option == 'e') {
			$allTables = $fixtures->tableNameList();
			if(!empty($allTables)) {
				$answer = Select::display('Select tables for export', $allTables, 1);
				$tables = $fixtures->export($answer);
				Output::items($tables, 'Exported tables');
			} else {
				Output::block("not tables for export!");
			}
		} elseif($option == 'i') {
			$allTables = $fixtures->fixtureNameList();
			if(!empty($allTables)) {
				$answer = Select::display('Select tables for import', $allTables, 1);
				$tables = $fixtures->import($answer);
				Output::items($tables, 'Imported tables');
			} else {
				Output::block("not tables for import!");
			}
		}
		
	}
public function actionIndex($option = null)
	{
		$fixtures = Yii::createObject(Fixtures::className());
		$option = Question::displayWithQuit('Select operation', ['Export', 'Import'], $option);
		if($option == 'e') {
			$allTables = $fixtures->tableNameList();
			if(!empty($allTables)) {
				$answer = Select::display('Select tables for export', $allTables, 1);
				$tables = $fixtures->export($answer);
				Output::items($tables, 'Exported tables');
			} else {
				Output::block("not tables for export!");
			}
		} elseif($option == 'i') {
			$allTables = $fixtures->fixtureNameList();
			if(!empty($allTables)) {
				$answer = Select::display('Select tables for import', $allTables, 1);
				$tables = $fixtures->import($answer);
				Output::items($tables, 'Imported tables');
			} else {
				Output::block("not tables for import!");
			}
		}
		
	}
public function actionIndex ( $ option = null ) { $ fixtures = Yii :: createObject ( Fixtures :: className ( ) ) ; $ option = Question :: displayWithQuit ( 'Select operation' , [ 'Export' , 'Import' ] , $ option ) ; if ( $ option == 'e' ) { $ allTables = $ fixtures -> tableNameList ( ) ; if ( ! empty ( $ allTables ) ) { $ answer = Select :: display ( 'Select tables for export' , $ allTables , 1 ) ; $ tables = $ fixtures -> export ( $ answer ) ; Output :: items ( $ tables , 'Exported tables' ) ; } else { Output :: block ( "not tables for export!" ) ; } } elseif ( $ option == 'i' ) { $ allTables = $ fixtures -> fixtureNameList ( ) ; if ( ! empty ( $ allTables ) ) { $ answer = Select :: display ( 'Select tables for import' , $ allTables , 1 ) ; $ tables = $ fixtures -> import ( $ answer ) ; Output :: items ( $ tables , 'Imported tables' ) ; } else { Output :: block ( "not tables for import!" ) ; } } }
Export or import fixtures
Export or import fixtures