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

Class: Translation2_Container_gettext

Source Location: /Translation2-2.0.0beta2/Container/gettext.php

Class Overview

Translation2_Container
   |
   --Translation2_Container_gettext

Storage driver for fetching data with gettext


Author(s):

Version:

  • $Revision: 1.11 $

Methods


Child classes:

Translation2_Admin_Container_gettext
Storage driver for storing/fetching data to/from a gettext file

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

Class Details

[line 38]
Storage driver for fetching data with gettext
  • Version: $Revision: 1.11 $
  • See: /docs/gettext_readme.txt for an usage example


[ Top ]


Method Detail

Translation2_Container_gettext (Constructor)   [line 73]

object Returns Translation2_Container_gettext( array $options)

Constructor of the container class

Initate connection to the database via PEAR::DB

  • Return: an error object if something went wrong

Parameters:

array   $options   —  gettext parameters

[ Top ]

fetchLangs   [line 136]

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 249]

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

Get a single item from the container, without caching the whole page

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 195]

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

Get all the strings from a domain (parsing the .mo file)

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

Parameters:

string   $pageID   — 
   $langID   — 

[ Top ]

getStringID   [line 275]

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 ]

setLang   [line 157]

array setLang( string $langID)

Sets the current lang
  • Return: Lang data

Overrides Translation2_Container::setLang() (Sets the current lang)

Parameters:

string   $langID   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:56:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.