Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.4

Request #2508 Cant change options after calling Translation2::factory()
Submitted: 2004-10-11 20:43 UTC
From: tobias dot eberle at gmx dot de Assigned: quipo
Status: Closed Package: Translation2
PHP Version: 4.3.9 OS: linux
Roadmaps: (Not assigned)    

 [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));


 [2005-06-03 15:57 UTC] quipo
At last, I've added a "setContainerOptions()" method: $cTranslation2 = Translation2::factory('DB', $sDsn, $aParams); $aParams['strings_tables']['de'] = 'translation_de'; $cTranslation2->setContainerOptions($aParams); can you please check the CVS version, and tell me if it's working as you might expect, before an official release? TIA