PEAR::Translation2 re-instantaition of object

From: Date: Wed, 18 May 2005 23:26:02 +0000
Subject: PEAR::Translation2 re-instantaition of object
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19268@lists.php.net to get a copy of this message
Hi all, I'm creating a wrapper for Tanslation2 with a singleton method. I was wondering if there was a different approach to what I'm doing. First I instantiate a Translation2 object and call the getLangs() method. Using that values from getLangs() I build my $params array with the proper strings_table mapping and instantiate a second object. Is there a way to changed the $params settings in the first object so that I don't have to create a second object? Here's some code to help illustrate. $oLangs = & Translation2::factory($driver, $dsn, $params); $langs = $oLangs->getLangs(); // set params foreach ($langs as $aKey => $aValue) { $params['strings_tables'][$aKey] = $prefix . $aKey; } $oTranslation = &Translation2::factory($driver, $dsn, $params); return $oTranslation; Any ideas are welcome and thanks in advance. Best Regards, AJ Tarachanowicz II -- Local Hype - Support Your Local Scene www: http://www.localhype.net email: ajt@localhype.net phone: 616.301.0557

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
« previous php.pear.general (#19268) next »