public function init( $config = NULL )
    {
        parent::init( $config );
        
        if ( !isset( $config[ 'migration_path' ] ) )
        {
            throw new \InvalidArgumentException( 'Missing migration_path parameter' );
        }
        
        foreach ( $config as $key => $value )
        {
            switch( $key )
            {
                case 'migration_path':
                    $this->migrationPath = $value;
                    break;
                
                case 'migration_namespace':
                    $this->migrationNamespace = $value;
                    break;
                
                case 'namespaces':
                    $this->namespaces = $value;
                    break;
                
                case 'class_prefix':
                    $this->classPrefix = $value;
                    break;
                
                case 'migration_table':
                    $this->migrationTable = $value;
                    break;
                
                case 'class_name_style':
                    $this->migrationClassStyle = $value;
                    break;
                
                case 'overwrite':
                    $this->overwrite = $value;
                    break;
                
                case 'levels':
                    $this->levels = $value;
                    break;
                
                case 'name':
                    $this->migrationClass = $value;
                    break;
                
                case 'verbose':
                    $this->verbose = $value === 'true' ? TRUE : FALSE;
                    break;
                
                default:
                    // Do nothing
                    break;
            }
        }
        
        $this->doAction( self::ON_INIT_ACTION );
    }
public function init( $config = NULL )
    {
        parent::init( $config );
        
        if ( !isset( $config[ 'migration_path' ] ) )
        {
            throw new \InvalidArgumentException( 'Missing migration_path parameter' );
        }
        
        foreach ( $config as $key => $value )
        {
            switch( $key )
            {
                case 'migration_path':
                    $this->migrationPath = $value;
                    break;
                
                case 'migration_namespace':
                    $this->migrationNamespace = $value;
                    break;
                
                case 'namespaces':
                    $this->namespaces = $value;
                    break;
                
                case 'class_prefix':
                    $this->classPrefix = $value;
                    break;
                
                case 'migration_table':
                    $this->migrationTable = $value;
                    break;
                
                case 'class_name_style':
                    $this->migrationClassStyle = $value;
                    break;
                
                case 'overwrite':
                    $this->overwrite = $value;
                    break;
                
                case 'levels':
                    $this->levels = $value;
                    break;
                
                case 'name':
                    $this->migrationClass = $value;
                    break;
                
                case 'verbose':
                    $this->verbose = $value === 'true' ? TRUE : FALSE;
                    break;
                
                default:
                    // Do nothing
                    break;
            }
        }
        
        $this->doAction( self::ON_INIT_ACTION );
    }
public function init ( $ config = NULL ) { parent :: init ( $ config ) ; if ( ! isset ( $ config [ 'migration_path' ] ) ) { throw new \ InvalidArgumentException ( 'Missing migration_path parameter' ) ; } foreach ( $ config as $ key => $ value ) { switch ( $ key ) { case 'migration_path' : $ this -> migrationPath = $ value ; break ; case 'migration_namespace' : $ this -> migrationNamespace = $ value ; break ; case 'namespaces' : $ this -> namespaces = $ value ; break ; case 'class_prefix' : $ this -> classPrefix = $ value ; break ; case 'migration_table' : $ this -> migrationTable = $ value ; break ; case 'class_name_style' : $ this -> migrationClassStyle = $ value ; break ; case 'overwrite' : $ this -> overwrite = $ value ; break ; case 'levels' : $ this -> levels = $ value ; break ; case 'name' : $ this -> migrationClass = $ value ; break ; case 'verbose' : $ this -> verbose = $ value === 'true' ? TRUE : FALSE ; break ; default : // Do nothing break ; } } $ this -> doAction ( self :: ON_INIT_ACTION ) ; }
Initialises the migrator.

@param array $config configuration array

@action ON_INIT_ACTION

@throws \InvalidArgumentException if a configuration is missing
Initialises the migrator .