Pluf Framework

Sign in or create your account | Project List | Help

Pluf Framework Commit Details

Date:2009-05-15 10:48:31 (9 months 25 days ago)
Author:Loïc d'Anterroches
Commit:95a9768590da0f57ff54214e8dcdd54da2caa081
Message:Added the ability to add paths to the default include path.

Files: src/migrate.php (3 diffs)

Change Details

src/migrate.php
3838
3939$cg = new Console_Getopt();
4040$shortoptions = 'aixuc:v:d';
41$longoptions = array('app=', 'version=', 'conf=', 'search-path=');
41$longoptions = array('app=', 'version=', 'conf=', 'search-path=', 'include-path=');
4242
4343$args = $cg->readPHPArgv();
4444
...... 
5858        .' Upgrade MyApp: migrate.php --conf=path/to/config.php --app=MyApp'."\n"
5959        .''."\n"
6060        .'Options:'."\n"
61        .' c, --conf: Path to the configuration file.'."\n"
62        .' a: Upgrade all the installed applications.'."\n"
63        .' v, --version: Upgrade/Downgrade to the given version.'."\n"
64        .' --app: Application to upgrade/downgrade.'."\n"
65        .' u: Dry run, do nothing.'."\n"
66        .' --search-path: Set the DB search path before the run.'."\n"
67        .' d: Display debug information.'."\n"
68        .' i: Install the application(s).'."\n"
69        .' x: Uninstall the application(s).'."\n"
61        .' c, --conf: Path to the configuration file.'."\n"
62        .' a: Upgrade all the installed applications.'."\n"
63        .' v, --version: Upgrade/Downgrade to the given version.'."\n"
64        .' --app: Application to upgrade/downgrade.'."\n"
65        .' u: Dry run, do nothing.'."\n"
66        .' --search-path: Set the DB search path before the run.'."\n"
67        .' --include-path: Paths to add to the PHP include path.'."\n"
68        .' d: Display debug information.'."\n"
69        .' i: Install the application(s).'."\n"
70        .' x: Uninstall the application(s).'."\n"
7071        .''."\n"
7172        .'Note: The command line parser of PEAR is not very robust'."\n"
7273        .' if you have an unexpected error about an offset not'."\n"
...... 
125126        case '--search-path':
126127            $search_path = trim($o[1]);
127128            break;
129        case '--include-path':
130            set_include_path(get_include_path().PATH_SEPARATOR.trim($o[1]));
131            break;
128132        case 'u':
129133            $what['dry_run'] = true;
130134            break;

Archive Download the corresponding diff file

Branches:
master