Class jDb

Description

factory for database connector and other db utilities

Located in /db/jDb.class.php (line 27)


	
			
Method Summary
static jDbConnection getConnection ([string $name = null])
static jDbWidget getDbWidget ([string $name = null])
static array getProfil ([string $name = ''], [boolean $nameIsProfilType = false])
static jDbTools getTools ([string $name = null])
boolean testProfil (array $profil)
Methods
static getConnection (line 34)

return a database connector Use a local pool.

  • return: connector
  • access: public
static jDbConnection getConnection ([string $name = null])
  • string $name: profil name to use. if empty, use the default one
static getDbWidget (line 56)

create a new jDbWidget

  • access: public
static jDbWidget getDbWidget ([string $name = null])
  • string $name: profil name to use. if empty, use the default one
static getProfil (line 107)

load properties of a connector profil

a profil is a section in the dbprofils.ini.php file

with getProfil('myprofil') (or getProfil('myprofil', false)), you get the profil which has the name "myprofil". this name should correspond to a section name in the ini file

with getProfil('myprofiltype',true), it will search a parameter named 'myprofiltype' in the ini file. This parameter should contains a profil name, and the corresponding profil will be loaded.

with getProfil(), it will load the default profil, (so the profil of "default" type)

  • return: properties
  • access: public
static array getProfil ([string $name = ''], [boolean $nameIsProfilType = false])
  • string $name: profil name or profil type to load. if empty, use the default one
  • boolean $nameIsProfilType: says if the name is a profil name or a profil type. this parameter exists since 1.0b2
static getTools (line 66)

instancy a jDbTools object

  • access: public
static jDbTools getTools ([string $name = null])
  • string $name: profil name to use. if empty, use the default one
testProfil (line 140)

call it to test a profil (during an install for example)

  • return: true if properties are ok
  • access: public
boolean testProfil (array $profil)
  • array $profil: profil properties

Documentation generated on Wed, 07 Sep 2011 13:47:10 +0200 by phpDocumentor 1.4.3