cvs: pear /Translation2 Container.php Decorator.php Translation2.php package.xml /Translation2/Container mdb2.php

From: Date: Tue, 14 Nov 2006 18:01:04 +0000
Subject: cvs: pear /Translation2 Container.php Decorator.php Translation2.php package.xml /Translation2/Container mdb2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-43072@lists.php.net to get a copy of this message
quipo Tue Nov 14 18:01:04 2006 UTC Modified files: /pear/Translation2 Container.php Decorator.php Translation2.php package.xml /pear/Translation2/Container mdb2.php Log: added setCharset() method

http://cvs.php.net/viewvc.cgi/pear/Translation2/Container.php?r1=1.16&r2=1.17&diff_format=u Index: pear/Translation2/Container.php diff -u pear/Translation2/Container.php:1.16 pear/Translation2/Container.php:1.17 --- pear/Translation2/Container.php:1.16 Sat Feb 11 18:26:36 2006 +++ pear/Translation2/Container.php Tue Nov 14 18:01:03 2006 @@ -32,7 +32,7 @@ * @author Lorenzo Alberton <l dot alberton at quipo dot it> * @copyright 2004-2005 Lorenzo Alberton * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) - * @version CVS: $Id: Container.php,v 1.16 2006/02/11 18:26:36 quipo Exp $ + * @version CVS: $Id: Container.php,v 1.17 2006/11/14 18:01:03 quipo Exp $ * @link http://pear.php.net/package/Translation2 */ @@ -126,6 +126,23 @@ } // }}} + // {{{ setCharset() + + /** + * Set charset used to read/store the translations + * + * @param string $charset + */ + function setCharset($charset) + { + if (method_exists($this->storage, 'setCharset')) { + return $this->storage->setCharset($charset); + } + return $this->raiseError(TRANSLATION2_ERROR_UNSUPPORTED, null, null, + 'method not implemented', __FUNCTION__); + } + + // }}} // {{{ setLang() /** http://cvs.php.net/viewvc.cgi/pear/Translation2/Decorator.php?r1=1.17&r2=1.18&diff_format=u Index: pear/Translation2/Decorator.php diff -u pear/Translation2/Decorator.php:1.17 pear/Translation2/Decorator.php:1.18 --- pear/Translation2/Decorator.php:1.17 Thu Sep 8 21:11:51 2005 +++ pear/Translation2/Decorator.php Tue Nov 14 18:01:03 2006 @@ -32,7 +32,7 @@ * @author Lorenzo Alberton <l dot alberton at quipo dot it> * @copyright 2004-2005 Lorenzo Alberton * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) - * @version CVS: $Id: Decorator.php,v 1.17 2005/09/08 21:11:51 quipo Exp $ + * @version CVS: $Id: Decorator.php,v 1.18 2006/11/14 18:01:03 quipo Exp $ * @link http://pear.php.net/package/Translation2 */ @@ -171,6 +171,18 @@ } // }}} + // {{{ setCharset() + + /** + * Set charset used to read/store the translations + * @param string $charset + */ + function setCharset($charset) + { + return $this->translation2->setCharset($format); + } + + // }}} // {{{ setLang() /** http://cvs.php.net/viewvc.cgi/pear/Translation2/Translation2.php?r1=1.35&r2=1.36&diff_format=u Index: pear/Translation2/Translation2.php diff -u pear/Translation2/Translation2.php:1.35 pear/Translation2/Translation2.php:1.36 --- pear/Translation2/Translation2.php:1.35 Thu Sep 8 17:27:35 2005 +++ pear/Translation2/Translation2.php Tue Nov 14 18:01:03 2006 @@ -30,9 +30,9 @@ * @category Internationalization * @package Translation2 * @author Lorenzo Alberton <l dot alberton at quipo dot it> - * @copyright 2004-2005 Lorenzo Alberton + * @copyright 2004-2006 Lorenzo Alberton * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) - * @version CVS: $Id: Translation2.php,v 1.35 2005/09/08 17:27:35 quipo Exp $ + * @version CVS: $Id: Translation2.php,v 1.36 2006/11/14 18:01:03 quipo Exp $ * @link http://pear.php.net/package/Translation2 */ @@ -62,6 +62,7 @@ define('TRANSLATION2_ERROR_CANNOT_WRITE_FILE', -8); define('TRANSLATION2_ERROR_UNKNOWN_LANG', -9); define('TRANSLATION2_ERROR_ENCODING_CONVERSION', -10); +define('TRANSLATION2_ERROR_UNSUPPORTED', -11); /** * Translation2 base class @@ -73,7 +74,7 @@ * @category Internationalization * @package Translation2 * @author Lorenzo Alberton <l dot alberton at quipo dot it> - * @copyright 2004-2005 Lorenzo Alberton + * @copyright 2004-2006 Lorenzo Alberton * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) * @link http://pear.php.net/package/Translation2 */ @@ -109,7 +110,7 @@ var $currentPageID = null; /** - * Array parameters + * Array of parameters for the adapter class * @var array * @access protected */ @@ -140,7 +141,7 @@ * @param mixed $options Additional options for the storage driver * (example: if you are using DB as the storage * driver, you have to pass the dsn string here) - * @param array $params Array of parameters for the adapter class + * @param array $params Array of parameters for the adapter class * (i.e. you can set here the mappings between your * table/field names and the ones used by this class) * @return object Translation2 instance or PEAR_Error on failure @@ -182,7 +183,6 @@ return $err; } return $storage; - } // }}} @@ -263,6 +263,22 @@ } // }}} + // {{{ setCharset() + + /** + * Set charset used to read/store the translations + * + * @param string $charset + */ + function setCharset($charset) + { + $res = $this->storage->setCharset($charset); + if (PEAR::isError($res)) { + return $res; + } + } + + // }}} // {{{ setLang() /** http://cvs.php.net/viewvc.cgi/pear/Translation2/package.xml?r1=1.98&r2=1.99&diff_format=u Index: pear/Translation2/package.xml diff -u pear/Translation2/package.xml:1.98 pear/Translation2/package.xml:1.99 --- pear/Translation2/package.xml:1.98 Tue Nov 7 12:35:40 2006 +++ pear/Translation2/package.xml Tue Nov 14 18:01:03 2006 @@ -45,7 +45,7 @@ </maintainers> <release> <version>2.0.0beta12</version> - <date>2006-10-31</date> + <date>2006-11-14</date> <license>BSD License</license> <state>beta</state> <notes> @@ -60,6 +60,7 @@ containers) - fixed dataobjectsimple container, get[Raw]Page() was returning integers as keys instead of strings (thanks to Michael Henry) +- added setCharset() method (currently only implemented in the MDB2 driver) </notes> <deps> <dep type="pkg" rel="has" optional="yes">Cache_Lite</dep> @@ -159,7 +160,7 @@ <changelog> <release> <version>2.0.0beta12</version> - <date>2006-10-31</date> + <date>2006-11-14</date> <license>BSD License</license> <state>beta</state> <notes> @@ -174,6 +175,7 @@ containers) - fixed dataobjectsimple container, get[Raw]Page() was returning integers as keys instead of strings (thanks to Michael Henry) +- added setCharset() method (currently only implemented in the MDB2 driver) </notes> </release> <release> http://cvs.php.net/viewvc.cgi/pear/Translation2/Container/mdb2.php?r1=1.24&r2=1.25&diff_format=u Index: pear/Translation2/Container/mdb2.php diff -u pear/Translation2/Container/mdb2.php:1.24 pear/Translation2/Container/mdb2.php:1.25 --- pear/Translation2/Container/mdb2.php:1.24 Mon Oct 9 15:23:48 2006 +++ pear/Translation2/Container/mdb2.php Tue Nov 14 18:01:04 2006 @@ -32,7 +32,7 @@ * @author Lorenzo Alberton <l dot alberton at quipo dot it> * @copyright 2004-2005 Lorenzo Alberton * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) - * @version CVS: $Id: mdb2.php,v 1.24 2006/10/09 15:23:48 quipo Exp $ + * @version CVS: $Id: mdb2.php,v 1.25 2006/11/14 18:01:04 quipo Exp $ * @link http://pear.php.net/package/Translation2 */ @@ -52,7 +52,7 @@ * @author Lorenzo Alberton <l dot alberton at quipo dot it> * @copyright 2004-2005 Lorenzo Alberton * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) - * @version CVS: $Id: mdb2.php,v 1.24 2006/10/09 15:23:48 quipo Exp $ + * @version CVS: $Id: mdb2.php,v 1.25 2006/11/14 18:01:04 quipo Exp $ * @link http://pear.php.net/package/Translation2 */ class Translation2_Container_mdb2 extends Translation2_Container @@ -149,6 +149,19 @@ } // }}} + // {{{ setCharset() + + /** + * Set charset used to read/store the translations + * + * @param string $charset + */ + function setCharset($charset) + { + return $this->db->setCharset($charset); + } + + // }}} // {{{ fetchLangs() /**
« previous php.pear.cvs (#43072) next »