Code Search for Developers
 
 
  

Db.php from Astrum Futura at Krugle


Show Db.php syntax highlighted

<?php
/**
 * Quantum Game Library
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the text file LICENSE located in the root
 * directory of this library.
 * It is also available through the internet at this URL:
 * http://doc.astrumfutura.com/license.html
 *
 * If you did not receive a copy of the license and are unable to
 * obtain it through the internet, please send an email
 * to license@astrumfutura.com so we can send you a copy.
 *
 * @package    Db
 * @category   Quantum
 * @copyright  Copyright (c) 2007 The QGL Group (refer to COPYRIGHT file)
 * @version    $Id: Db.php 275 2007-03-19 23:01:47Z maugrim_t_r $
 * @license    http://doc.astrumfutura.com/license.html     New BSD License
 */

/** Quantum_Db_Exception */
require_once 'Quantum/Db/Exception.php';

/**
 * @package    Db
 * @subpackage Factory
 * @category   Quantum
 */
class Quantum_Db {

    /*
     * Create a new Driver instance based on a configuration array.
     *
     * @param array $config
     * @return Quantum_Db_Driver_Interface
     */
    static public function factory(array $config)
    {
		switch($config['driver'])
		{
		    case 'pdo_mysql':
                require_once 'Quantum/Db/Driver/Pdo/Mysql.php';
                $conn = new Quantum_Db_Driver_Pdo_Mysql($config);
                break;
            default:
                throw new Quantum_Db_Exception($config['dbtype'] . ' is not a supported database type');
		}
        return $conn;
    }

}



See more files for this project here

Astrum Futura

Multiplayer space strategy game written in PHP5 with the Zend Framework. User interface uses Javascript/AJAX for dynamic interaction. Players compete across a hexagonal map of 10,000 sectors, planets, stars and other locations through trade and combat.

Project homepage: http://sourceforge.net/projects/astrumfutura
Programming language(s): PHP,XML
License: other

  Coordinate/
    Array/
      Interface.php
    Boundary/
      Abstract.php
      Auto.php
      Exception.php
      Manual.php
    Exception/
      InvalidArray.php
      InvalidIndex.php
      InvalidX.php
      InvalidY.php
      InvalidZ.php
      RemovalFailure.php
    Node/
      Blocked.php
      End.php
      Impassable.php
      Interface.php
      Open.php
      Passable.php
      Planet.php
      Star.php
      Start.php
    Array.php
    Boundary.php
    Exception.php
    Index.php
    Interface.php
  Db/
    Access/
      Exception.php
      Interface.php
    Driver/
      Pdo/
        Abstract.php
        Mysql.php
      Exception.php
      Interface.php
    Schema/
      Exception.php
      Xml.php
    Access.php
    Db.php
    Exception.php
    NamedQueries.php
    NamedQueries.xml
    Row.php
  Map/
    Grid/
      Abstract.php
      Exception.php
      Hex.php
      Square.php
    Measure/
      Abstract.php
      Exception.php
      Hex.php
      Square.php
    Placement/
      Interface.php
    Star/
      Generate/
        Interface.php
        Simple.php
      Position/
        Interface.php
        Random.php
    Exception.php
  State/
    Action/
      Function.php
      Interface.php
      Method.php
    Condition/
      Boolean.php
      Contains.php
      Equality.php
      Greater.php
      Interface.php
      Less.php
      Range.php
    Abstract.php
    Condition.php
    Exception.php
    Transition.php
  Turing/
    Exception.php
    Interface.php
    Math.php
  Coordinate.php
  Db.php
  Exception.php
  Map.php
  State.php