public function getConfig()
    {
        if ($this->configuration) {
            return $this->configuration;
        }

        $dir = APP_DIR . DS . 'Resource' . DS . 'migrations';
        $migrationTable = 'phinxlog';

        if ($bundleName = $this->input->getOption('bundle')) {
            $dir = Bundles::getPath($bundleName) . DS . 'Resource' . DS . 'migrations';
        }

        return $this->configuration = new Config([
            'paths' => [
                'migrations' => $dir
            ],
            'environments' => [
                'default_migration_table' => $migrationTable,
                'default_database' => getenv('RAD_ENVIRONMENT'),
                getenv('RAD_ENVIRONMENT') => \Rad\Configure\Config::get('migrations.environments.' . getenv('RAD_ENVIRONMENT'))
            ]
        ]);
    }