Skip to content
Browse files

request #14979: fluent interface for setPageID() and setParams() and …

…for setOption() and setOptions() decorator methods

git-svn-id: http://svn.php.net/repository/pear/packages/Translation2/trunk@268999 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 21f4ce7 commit 9a6fc79b1d38abfab67291ebe56e75af0679265e @quipo quipo committed
Showing with 19 additions and 9 deletions.
  1. +2 −1 Decorator.php
  2. +2 −1 Decorator/CacheLiteFunction.php
  3. +4 −2 Translation2.php
  4. +11 −5 package.xml
View
3 Decorator.php
@@ -105,7 +105,7 @@ function Translation2_Decorator(& $translation2)
*
* @param array $options decorator options
*
- * @return void
+ * @return self
*/
function setOptions($options=array())
{
@@ -114,6 +114,7 @@ function setOptions($options=array())
$this->setOption($option, $value);
}
}
+ return $this;
}
// }}}
View
3 Decorator/CacheLiteFunction.php
@@ -189,7 +189,7 @@ function setLang($langID)
* @param string $name name of the option
* @param string $value new value of the option
*
- * @return void
+ * @return self
* @access public
* @see Cache_Lite::setOption()
*/
@@ -197,6 +197,7 @@ function setCacheOption($name, $value)
{
$this->_prepare();
$this->cacheLiteFunction->setOption($name, $value);
+ return $this;
}
// }}}
View
6 Translation2.php
@@ -319,11 +319,12 @@ function setLang($langID)
*
* @param string $pageID ID of the default page
*
- * @return void
+ * @return self
*/
function setPageID($pageID = null)
{
$this->currentPageID = $pageID;
+ return $this;
}
// }}}
@@ -392,7 +393,7 @@ function getLangs($format = 'name')
*
* @param array $params array of replacement parameters
*
- * @return void
+ * @return self
*/
function setParams($params = null)
{
@@ -403,6 +404,7 @@ function setParams($params = null)
} else {
$this->params = array($params);
}
+ return $this;
}
// }}}
View
16 package.xml
@@ -45,8 +45,8 @@ Currently, the following decorators are provided:
<email>mike@php.net</email>
<active>yes</active>
</developer>
- <date>2008-11-09</date>
- <time>19:55:00</time>
+ <date>2008-11-14</date>
+ <time>16:24:00</time>
<version>
<release>2.0.1</release>
<api>2.0.1</api>
@@ -59,7 +59,9 @@ Currently, the following decorators are provided:
<notes>- fixed bug #13933: undefined variable in the dataobjectsimple driver
- fixed bug #14323: wrong / no error from setLang() [cwiedmann]
- fixed bug in getLangs(), where certain formats were not recognized
-- request #14979: fluent interface for decorator's setOption() method
+- request #14979: fluent interface for setPageID() and setParams()
+ and for setOption() and setOptions() decorator methods
+- request #15000: added SQL example in the /docs/examples dir
</notes>
<contents>
<dir name="/">
@@ -103,8 +105,10 @@ Currently, the following decorators are provided:
<file baseinstalldir="Translation2" name="gettext_prepare.php" role="doc" />
<file baseinstalldir="Translation2" name="gettext_settings.php" role="doc" />
<file baseinstalldir="Translation2" name="settings.php" role="doc" />
+ <file baseinstalldir="Translation2" name="settings_multitable.php role="doc" />
<file baseinstalldir="Translation2" name="Translation2_example.php" role="doc" />
<file baseinstalldir="Translation2" name="Translation2_example.sql" role="doc" />
+ <file baseinstalldir="Translation2" name="Translation2_example_multitable.sql" role="doc" />
<file baseinstalldir="Translation2" name="Translation2_gettext_example.php" role="doc" />
</dir> <!-- /docs/examples -->
<file baseinstalldir="Translation2" name="gettext_readme.txt" role="doc" />
@@ -203,12 +207,14 @@ Currently, the following decorators are provided:
<release>stable</release>
<api>stable</api>
</stability>
- <date>2008-11-09</date>
+ <date>2008-11-14</date>
<license uri="http://www.debian.org/misc/bsd.license">BSD</license>
<notes>- fixed bug #13933: undefined variable in the dataobjectsimple driver
- fixed bug #14323: wrong / no error from setLang() [cwiedmann]
- fixed bug in getLangs(), where certain formats were not recognized
-- request #14979: fluent interface for decorator's setOption() method
+- request #14979: fluent interface for setPageID() and setParams()
+ and for setOption() and setOptions() decorator methods
+- request #15000: added SQL example in the /docs/examples dir
</notes>
</release>
<release>

0 comments on commit 9a6fc79

Please sign in to comment.
Something went wrong with that request. Please try again.