Sitellite Application Framework
Class Tree         Index         All Elements

Class: DBM

Source Location: Program_Root/Database/Manager.php

Class Overview


Database connection manager.


Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 24]
Database connection manager.


1 <?php
2
3 loader_import ('saf.Database.Manager');
4
5 $dbm = new DBM ();
6
7 $dbm->add ('conn1', 'MySQL:localhost:DBNAME', 'USER', 'PASS');
8
9 $db =& $dbm->getCurrent ();
10
11 ? >




[ Top ]


Class Variables

$connections = array ()

[line 30]

Connection list.



Tags:

access:  public

Type:   mixed


[ Top ]

$current =  false

[line 37]

Current connection.



Tags:

access:  public

Type:   mixed


[ Top ]

$error =  false

[line 44]

Error message, in case of error.



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor DBM [line 51]

DBM DBM( )

Constructor method.



Tags:

access:  public


[ Top ]

method add [line 65]

boolean add( string $name, [string $connstr = '::'], [string $user = ''], [string $pass = ''], [boolean $persistent = 0])

Add a new connection.



Tags:

access:  public


Parameters:

string   $name  
string   $connstr  
string   $user  
string   $pass  
boolean   $persistent  

[ Top ]

method getCurrent [line 129]

object &getCurrent( )

Retrieves the currently active database object.



Tags:

access:  public


[ Top ]

method remove [line 86]

boolean remove( string $name, [boolean $disconnect = true])

Remove a connection.



Tags:

access:  public


Parameters:

string   $name  
boolean   $disconnect  

[ Top ]

method setCurrent [line 106]

boolean setCurrent( string $name, [boolean $affectGlobalDB = true])

Set the specified connection to be the currently active one.



Tags:

access:  public


Parameters:

string   $name  
boolean   $affectGlobalDB  

[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:18:08 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2