10 * This source file is subject to the new BSD license that is bundled
11 * with this package in the file LICENSE.
12 * It is also available through the world-wide-web at this URL:
13 * http://phergie.org/license
17 * @author Phergie Development Team <team@phergie.org>
18 * @copyright 2008-2010 Phergie Development Team (http://phergie.org)
19 * @license http://phergie.org/license New BSD License
20 * @link http://pear.phergie.org/package/Phergie
24 * @see Phergie_Autoload
26 require 'Phergie/Autoload.php';
27 Phergie_Autoload::registerAutoloader();
29 $bot = new Phergie_Bot;
33 'The PHP setting register_argc_argv must be enabled for Phergie ',
34 'configuration files to be specified using command line arguments; ',
35 'defaulting to Settings.php in the current working directory',
37 } else if ($argc > 0) {
38 // Skip the current file for manual installations
39 // ex: php phergie.php Settings.php
40 if (realpath($argv[0]) == __FILE__) {
44 // If configuration files were specified, override default behavior
45 if (count($argv) > 0) {
46 $config = new Phergie_Config;
47 foreach ($argv as $file) {
50 $bot->setConfig($config);