Class Ethna_DB

Description

Ethna用DB抽象クラス

EthnaのフレームワークでDBオブジェクトを扱うための抽象クラス (のつもり...あぁすばらしきPHP 4)

Located in /class/DB.php (line 22)


	
			
Direct descendents
Class Description
 class Ethna_DB_PEAR Ethna用DB抽象クラス
 class Ethna_DB_ADOdb Ethna_DB_ADOdb
Variable Summary
 mixed $db
 mixed $transaction
Method Summary
 Ethna_DB __construct (object Ethna_Controller $controller, string $dsn, bool $persistent)
 mixed begin ()
 mixed commit ()
 mixed connect ()
 void disconnect ()
 string getDSN ()
 mixed getMetaData ()
 bool isValid ()
 array parseDSN (string $dsn)
 mixed rollback ()
Variables
mixed $db (line 32)
  • access: public

Redefined in descendants as:
mixed $transaction = array() (line 35)
  • access: protected

Redefined in descendants as:
Methods
Constructor __construct (line 48)

Ethna_DBクラスのコンストラクタ

  • access: public
Ethna_DB __construct (object Ethna_Controller $controller, string $dsn, bool $persistent)
  • object Ethna_Controller $controller: コントローラオブジェクト
  • string $dsn: DSN
  • bool $persistent: 持続接続設定

Redefined in descendants as:
begin (line 89)

DBトランザクションを開始する

  • return: 0:正常終了 Ethna_Error:エラー
  • access: public
mixed begin ()

Redefined in descendants as:
commit (line 109)

DBトランザクションを終了する

  • return: 0:正常終了 Ethna_Error:エラー
  • access: public
mixed commit ()

Redefined in descendants as:
connect (line 60)

DBに接続する

  • return: 0:正常終了 Ethna_Error:エラー
  • access: public
mixed connect ()

Redefined in descendants as:
disconnect (line 69)

DB接続を切断する

  • access: public
void disconnect ()

Redefined in descendants as:
getDSN (line 132)

DSNを取得する

  • return: DSN
  • access: public
string getDSN ()
getMetaData (line 120)

テーブル定義情報を取得する

  • return: array: PEAR::DBに準じたメタデータ Ethna_Error::エラー
  • access: public
mixed getMetaData ()

Redefined in descendants as:
isValid (line 79)

DB接続状態を返す

  • return: true:正常(接続済み) false:エラー/未接続
  • access: public
bool isValid ()

Redefined in descendants as:
parseDSN (line 172)

Parse a data source name

Additional keys can be added by appending a URI query string to the end of the DSN.

The format of the supplied DSN is in its fullest form:

  1.   phptype(dbsyntax)://username:password@protocol+hostspec/database?option=8&another=true

Most variations are allowed:

  1.   phptype://username:password@protocol+hostspec:110//usr/db_file.db?mode=0644
  2.   phptype://username:password@hostspec/database_name
  3.   phptype://username:password@hostspec
  4.   phptype://username@hostspec
  5.   phptype://hostspec/database
  6.   phptype://hostspec
  7.   phptype(dbsyntax)
  8.   phptype

  • return: an associative array with the following keys:
    • phptype: Database backend used in PHP (mysql, odbc etc.)
    • dbsyntax: Database used with regards to SQL syntax etc.
    • protocol: Communication protocol to use (tcp, unix etc.)
    • hostspec: Host specification (hostname[:port])
    • database: Database to use on the DBMS server
    • username: User name for login
    • password: Password for login
  • access: public
array parseDSN (string $dsn)
  • string $dsn: Data Source Name to be parsed
rollback (line 99)

DBトランザクションを中断する

  • return: 0:正常終了 Ethna_Error:エラー
  • access: public
mixed rollback ()

Redefined in descendants as:

Documentation generated on Fri, 11 Nov 2011 03:57:57 +0900 by phpDocumentor 1.4.3