Source for file DoctrineCli.php
Documentation is available at DoctrineCli.php
* Application_Bootstrap_DoctrineCli
* Copyright (C) 2009 Mai (Me Artificial Intelligence)
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* @author Wouter Bulten (wouterbulten@mai-ai.org)
* @copyright Copyright (C) 2009 Mai (Me Artificial Intelligence)
* @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3 (GPLv3)
* @link http://www.launchpad.net/mai
* @subpackage DoctrineCli
* Application_Bootstrap_DoctrineCli is the bootstrap for the Doctrine CLI interface.
* @author Wouter Bulten (wouterbulten@mai-ai.org)
* @copyright Copyright (C) 2009 Mai (Me Artificial Intelligence)
* @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3 (GPLv3)
* @link http://www.launchpad.net/mai
* @subpackage DoctrineCli
* Private constructor to prevent creation of this object.
* Starts up the bootstrap.
static public function run($arguments)
fwrite(STDOUT, "\n" . "Mai Doctrine Command Line Interface :: ");
//Create a connection (with base or user db)
unset ($arguments[$key]); //Unset to prevent Doctrine error
rsort($arguments); //Sort the array
fwrite(STDOUT, "Working on base DB" . "\n\n");
//Start connection with base db
fwrite(STDOUT, "Working on user DB" . "\n\n");
//Start connection with user db
$cli = new Doctrine_Cli($config);
$cli->run($_SERVER['argv']);
|