Translation2
[ class tree: Translation2 ] [ index: Translation2 ] [ all elements ]

Class: Translation2_Container_mdb2

Source Location: /Translation2-2.0.4/Translation2/Container/mdb2.php

Class Overview

Translation2_Container
   |
   --Translation2_Container_mdb2

Storage driver for fetching data from a database


Author(s):

Version:

  • CVS: $Id: mdb2.php 305985 2010-12-05 22:55:33Z clockwerx $

Copyright:

  • 2004-2008 Lorenzo Alberton

Variables

Methods


Child classes:

Translation2_Admin_Container_mdb2
Storage driver for storing/fetching data to/from a database

Inherited Variables

Inherited Methods

Class: Translation2_Container

Translation2_Container::Translation2_Container()
Constructor Has to be overwritten by each storage class
Translation2_Container::fetchLangs()
Fetch the available langs if they're not cached yet.
Translation2_Container::getLang()
Gets the current lang
Translation2_Container::getLangData()
Gets the array data for the lang
Translation2_Container::getLangs()
Gets the available languages
Translation2_Container::getOne()
Get a single item from the container, without caching the whole page Containers should implement this method.
Translation2_Container::getPage()
Returns an array of the strings in the selected page Containers should implement this method.
Translation2_Container::getStringID()
Get the stringID for the given string
Translation2_Container::raiseError()
Trigger a PEAR error
Translation2_Container::setCharset()
Set charset used to read/store the translations
Translation2_Container::setLang()
Sets the current language
Translation2_Container::_parseOptions()
Parse options passed to the container class

Class Details

[line 58]
Storage driver for fetching data from a database

This storage driver can use all databases which are supported by the PEAR::MDB2 abstraction layer to fetch data.



[ Top ]


Class Variables

$db =  null

[line 66]

MDB2 object

Type:   object


[ Top ]



Method Detail

fetchLangs   [line 177]

PEAR_Error fetchLangs( )

Fetch the available langs if they're not cached yet.
  • Return: on error

Overrides Translation2_Container::fetchLangs() (Fetch the available langs if they're not cached yet.)
[ Top ]

getOne   [line 258]

string getOne( string $stringID, [string $pageID = null], [string $langID = null])

Get a single item from the container

Overrides Translation2_Container::getOne() (Get a single item from the container, without caching the whole page Containers should implement this method.)

Parameters:

string   $stringID     string ID
string   $pageID     page/group ID
string   $langID     language ID

[ Top ]

getPage   [line 210]

array getPage( [string $pageID = null], [string $langID = null])

Returns an array of the strings in the selected page

Overrides Translation2_Container::getPage() (Returns an array of the strings in the selected page Containers should implement this method.)

Parameters:

string   $pageID     page/group ID
string   $langID     language ID

[ Top ]

getStringID   [line 296]

string getStringID( string $string, [string $pageID = null])

Get the stringID for the given string

Overrides Translation2_Container::getStringID() (Get the stringID for the given string)

Parameters:

string   $string     string
string   $pageID     page/group ID

[ Top ]

init   [line 85]

boolean|PEAR_Error init( string &$db)

Initialize the container
  • Return: object if something went wrong

Parameters:

string   &$db     Connection data or MDB2 object

[ Top ]

setCharset   [line 164]

PEAR_Error setCharset( string $charset)

Set charset used to read/store the translations
  • Return: on error

Overrides Translation2_Container::setCharset() (Set charset used to read/store the translations)

Parameters:

string   $charset     character set (encoding)

[ Top ]


Documentation generated on Mon, 06 Dec 2010 00:00:28 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.