PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Internationalization » Translation2 » Bug #2508

Cant change options after calling Translation2::factory()

Details

Request #2508Cant change options after calling Translation2::factory()
Submitted2004-10-11 20:43 UTC
Fromtobias dot eberle at gmx dot de
Assignedquipo
StatusClosed
PackageTranslation2
PHP Version4.3.9
OSlinux
Roadmaps(Not assigned)

Comments

[2004-10-11 20:43 UTC] tobias dot eberle at gmx dot de

Description:
------------
Hallo,

I can set for example "strings_tables" while constructing Translation2 with factory(). But I cant change it later.
The workaround shown in the reproduce code is quite not acceptable because _parseOptions() is a private method (storage is not classified).

It would be nice if you can implement a method allowing to set options later.

Bye, Tobias

Reproduce code:
---------------
$aParams = array('strings_tables' => array('en' => 'translation_en'));
$cTranslation2 = Translation2::factory('DB', $sDsn, $aParams);

//add german language
$aParams['strings_tables']['de'] = 'translation_de';
//workaround to set strings_tables after calling factory()
$cTranslation2->storage->_parseOptions(
array('strings_tables' =>$aParams));