. */ /** * Doctrine_Task_CreateDb * * @package Doctrine * @subpackage Task * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision: 2761 $ * @author Jonathan H. Wage */ class Doctrine_Task_CreateDb extends Doctrine_Task { public $description = 'Create all databases for your connections. If the database already exists, nothing happens.', $optionalArguments = array(); public function execute() { $results = Doctrine::createDatabases(); foreach ($results as $dbName => $bool) { $msg = $bool ? 'Successfully created database named: "' . $dbName . '"':'Could not create database named: "' .$dbName . '"'; $this->notify($msg); } } }