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

Class: Translation2_Admin_Container_xml

Source Location: /Translation2-2.0.0beta4/Admin/Container/xml.php

Class Overview

Translation2_Container
   |
   --Translation2_Container_xml
      |
      --Translation2_Admin_Container_xml

Storage driver for storing/fetching data to/from an XML file


Author(s):

Version:

  • $Revision $

Methods


Inherited Variables

Inherited Methods

Class: Translation2_Container_xml

Translation2_Container_xml::fetchLangs()
Fetch the available langs
Translation2_Container_xml::getOne()
Get a single item from the container
Translation2_Container_xml::getPage()
Returns an array of the strings in the selected page
Translation2_Container_xml::getStringID()
Get the stringID for the given string
Translation2_Container_xml::init()
Initialize the container

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 39]
Storage driver for storing/fetching data to/from an XML file
  • Version: $Revision $


[ Top ]


Method Detail

add   [line 101]

mixed add( string $stringID, string $pageID, array $stringArray)

Add a new entry in the strings table.
  • Return: true on success, PEAR_Error on failure

Parameters:

string   $stringID   — 
string   $pageID   — 
array   $stringArray   —  Associative array with string translations. Sample format: array('en' => 'sample', 'it' => 'esempio')

[ Top ]

addLangToAvailList   [line 72]

mixed addLangToAvailList( array $langData)

Creates a new entry in the <languages> section
  • Return: true on success, PEAR_Error on failure

Parameters:

array   $langData   —  array('lang_id' => 'en', 'name' => 'english', 'meta' => 'some meta info', 'error_text' => 'not available', 'encoding' => 'iso-8859-1', );

[ Top ]

createNewLang   [line 53]

mixed createNewLang( array $langData)

Does nothing (here for compatibility with the container interface)
  • Return: true on success, PEAR_Error on failure

Parameters:

array   $langData   — 

[ Top ]

remove   [line 151]

mixed remove( string $stringID, string $pageID)

Remove an entry from the strings table.
  • Return: true on success, PEAR_Error on failure

Parameters:

string   $stringID   — 
string   $pageID   — 

[ Top ]

removeLang   [line 174]

mixed removeLang( string $langID, [boolean $force = true])

Remove all the entries for the given lang from the strings table.
  • Return: true on success, PEAR_Error on failure

Parameters:

string   $langID   — 
boolean   $force   —  (ignored)

[ Top ]

update   [line 136]

mixed update( string $stringID, string $pageID, array $stringArray)

Update an existing entry in the strings table.
  • Return: true on success, PEAR_Error on failure

Parameters:

string   $stringID   — 
string   $pageID   — 
array   $stringArray   —  Associative array with string translations. Sample format: array('en' => 'sample', 'it' => 'esempio')

[ Top ]


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