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

Class: Translation2_Container_db

Source Location: /Translation2-2.0.0beta10/Container/db.php

Class Overview

Translation2_Container
   |
   --Translation2_Container_db

Storage driver for fetching data from a database


Author(s):

Version:

  • CVS: $Id: db.php,v 1.30 2006/07/06 11:03:34 quipo Exp $

Copyright:

  • 2004-2005 Lorenzo Alberton, Ian Eure

Variables

Methods


Child classes:

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

Inherited Variables

Inherited Methods

Class: Translation2_Container

Translation2_Container::Translation2_Container()
Constructor
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::setLang()
Sets the current lang
Translation2_Container::_parseOptions()
Parse options passed to the container class

Class Details

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

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



[ Top ]


Class Variables

$db =  null

[line 68]

DB object

Type:   object


[ Top ]



Method Detail

fetchLangs   [line 160]

void fetchLangs( )

Fetch the available langs if they're not cached yet.

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

getOne   [line 227]

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   $pageID   — 
string   $langID   — 

[ Top ]

getPage   [line 190]

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   — 
string   $langID   — 

[ Top ]

getStringID   [line 264]

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

Get the stringID for the given string

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

Parameters:

string   $stringID   — 
string   $pageID   — 
   $string   — 

[ Top ]

init   [line 86]

boolean|PEAR_Error init( mixed &$db)

Initialize the container
  • Return: object if something went wrong

Parameters:

mixed   &$db   —  string DSN or object DB instance

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:41:44 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.