source: branches/feature-module-update/data/class/db/SC_DB_DBFactory.php @ 15123

Revision 15123, 851 bytes checked in by nanasess, 17 years ago (diff)

db パッケージ追加(クラス定義のみ)

  • Property charset set to UTF-8'
  • Property svn:keywords set to Id Revision Date
  • Property svn:mime-type set to 'application/x-httpd-php
Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8// {{{ requires
9require_once(CLASS_PATH . "db/dbfactory/SC_DB_DBFactory_MYSQL.php");
10require_once(CLASS_PATH . "db/dbfactory/SC_DB_DBFactory_PGSQL.php");
11
12/**
13 * DBに依存した処理を抽象化するファクトリークラス.
14 *
15 * @package DB
16 * @author LOCKON CO.,LTD.
17 * @version $Id$
18 */
19class SC_Db_DBFactory {
20
21    /**
22     * DB_TYPE に応じた DBFactory インスタンスを生成する.
23     *
24     * @return mixed DBFactory インスタンス
25     */
26    function getInstance() {
27        switch (DB_TYPE) {
28        case "mysql":
29            return new SC_DB_DBFactory_MYSQL();
30            break;
31
32        case "pgsql":
33            return new SC_DB_DBFactory_PGSQL();
34            break;
35
36        default:
37        }
38    }
39}
40?>
Note: See TracBrowser for help on using the repository browser.