cvs: pear /Translation2/Decorator Lang.php
| From: | Lorenzo Alberton | Date: | Fri, 23 Apr 2004 14:51:17 +0000 |
| Subject: | cvs: pear /Translation2/Decorator Lang.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-18629@lists.php.net to get a copy of this message | ||
quipo Fri Apr 23 10:51:17 2004 EDT
Modified files:
/pear/Translation2/Decorator Lang.php
Log:
add setOption() interceptor for 'fallbackLang'. Why? I wish I knew...
http://cvs.php.net/diff.php/pear/Translation2/Decorator/Lang.php?r1=1.4&r2=1.5&ty=u
Index: pear/Translation2/Decorator/Lang.php
diff -u pear/Translation2/Decorator/Lang.php:1.4 pear/Translation2/Decorator/Lang.php:1.5
--- pear/Translation2/Decorator/Lang.php:1.4 Fri Apr 23 09:40:28 2004
+++ pear/Translation2/Decorator/Lang.php Fri Apr 23 10:51:17 2004
@@ -16,11 +16,11 @@
// | Authors: Lorenzo Alberton <l dot alberton at quipo dot it> |
// +----------------------------------------------------------------------+
//
-// $Id: Lang.php,v 1.4 2004/04/23 13:40:28 quipo Exp $
+// $Id: Lang.php,v 1.5 2004/04/23 14:51:17 quipo Exp $
//
/**
* @package Translation2
- * @version $Id: Lang.php,v 1.4 2004/04/23 13:40:28 quipo Exp $
+ * @version $Id: Lang.php,v 1.5 2004/04/23 14:51:17 quipo Exp $
*/
/**
* Load Translation2 decorator base class
@@ -35,6 +35,13 @@
{
// {{{ class vars
+ /**
+ * fallback lang
+ * @var string
+ * @access protected
+ */
+ var $fallbackLang;
+
// }}}
// {{{ setFallbackLang()
@@ -51,6 +58,25 @@
}
// }}}
+ // {{{ setOption()
+
+ /**
+ * set Decorator option (intercept 'fallbackLang' option).
+ * I don't know why it's needed, but it doesn't work without.
+ *
+ * @param string option name
+ * @param mixed option value
+ */
+ function setOption($option, $value=null)
+ {
+ if ($option == 'fallbackLang') {
+ $this->fallbackLang = $value;
+ } else {
+ parent::setOption($option, $value);
+ }
+ }
+
+ // }}}
// {{{ get()
/**