Permalink
Browse files

added getLangs() to the CacheLiteFunction Decorator

git-svn-id: http://svn.php.net/repository/pear/packages/Translation2/trunk@246134 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 0d366f1 commit 2419d873b2ab95ffc2988f1b4ecc15d716c30cf6 @quipo quipo committed Nov 13, 2007
Showing with 30 additions and 3 deletions.
  1. +25 −0 Decorator/CacheLiteFunction.php
  2. +5 −3 package.xml
@@ -200,6 +200,31 @@ function setCacheOption($name, $value)
}
// }}}
+ // {{{ getLangs()
+
+ /**
+ * get langs
+ *
+ * Get some extra information about the languages (their full names,
+ * the localized error text, their codes, ...)
+ *
+ * @param string $format ['ids', 'names', 'array']
+ *
+ * @return array
+ */
+ function getLangs($format = 'name')
+ {
+ // WITHOUT THIS, IT DOESN'T WORK
+ global $translation2_cachelitefunction_temp;
+ //generate temp variable
+ $translation2_cachelitefunction_temp = $this->translation2;
+
+ $this->_prepare();
+ return $this->cacheLiteFunction->call('translation2_cachelitefunction_temp->getLangs',
+ $format);
+ }
+
+ // }}}
// {{{ getRaw()
/**
View
@@ -45,8 +45,8 @@ Currently, the following decorators are provided:
<email>mike@php.net</email>
<active>yes</active>
</developer>
- <date>2007-11-10</date>
- <time>01:02:30</time>
+ <date>2007-11-13</date>
+ <time>22:15:30</time>
<version>
<release>2.0.0RC2</release>
<api>2.0.0RC2</api>
@@ -63,6 +63,7 @@ Currently, the following decorators are provided:
- bug #12398: fixed return value of addLangToList() and updateLang() in the MDB2
admin container
- request #12405: added removePage() method in the Admin module
+- added getLangs() to the CacheLiteFunction Decorator
- fixed the test suite
- fixed Coding Standards
</notes>
@@ -210,7 +211,7 @@ Currently, the following decorators are provided:
<release>beta</release>
<api>beta</api>
</stability>
- <date>2007-11-10</date>
+ <date>2007-11-13</date>
<license uri="http://www.debian.org/misc/bsd.license">BSD</license>
<notes>- request #11711: added setCharset() method in the DB container
- bug #11880: [XML driver] removing one language removes all strings for all languages
@@ -219,6 +220,7 @@ Currently, the following decorators are provided:
- bug #12398: fixed return value of addLangToList() and updateLang() in the MDB2
admin container
- request #12405: added removePage() method in the Admin module
+- added getLangs() to the CacheLiteFunction Decorator
- fixed the test suite
- fixed Coding Standards
</notes>

0 comments on commit 2419d87

Please sign in to comment.