summaryrefslogtreecommitdiff
path: root/lib/plugins/syntax.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2012-07-28 11:06:10 +0200
committerMichael Hamann <michael@content-space.de>2012-07-28 11:34:47 +0200
commite3ab6fc5cbab1aaf365e73abaa3d91c03eebdd47 (patch)
treedb89e649bb19012ffaa6b01cb796606ee6c50d4d /lib/plugins/syntax.php
parent9a9b579a79463369319f9613a630625a99eeded0 (diff)
downloadrpg-e3ab6fc5cbab1aaf365e73abaa3d91c03eebdd47.tar.gz
rpg-e3ab6fc5cbab1aaf365e73abaa3d91c03eebdd47.tar.bz2
Fixed and extended PHPDoc comments and added additional @var comments
Diffstat (limited to 'lib/plugins/syntax.php')
-rw-r--r--lib/plugins/syntax.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index 12451f636..d4394eb6f 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -86,7 +86,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
* @param $match string The text matched by the patterns
* @param $state int The lexer state for the match
* @param $pos int The character position of the matched text
- * @param $handler ref Reference to the Doku_Handler object
+ * @param $handler Doku_Handler Reference to the Doku_Handler object
* @return array Return an array with all data you want to use in render
*/
function handle($match, $state, $pos, &$handler){
@@ -111,10 +111,10 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
* The contents of the $data array depends on what the handler() function above
* created
*
- * @param $format string output format being rendered
- * @param $renderer ref reference to the current renderer object
- * @param $data array data created by handler()
- * @return boolean rendered correctly?
+ * @param $format string output format being rendered
+ * @param $renderer Doku_Renderer reference to the current renderer object
+ * @param $data array data created by handler()
+ * @return boolean rendered correctly?
*/
function render($format, &$renderer, $data) {
trigger_error('render() not implemented in '.get_class($this), E_USER_WARNING);
@@ -148,6 +148,12 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
// extract from class name, format = <plugin type>_plugin_<name>[_<component name>]
function getPluginType() { list($t) = explode('_', get_class($this), 2); return $t; }
function getPluginName() { list($t, $p, $n) = explode('_', get_class($this), 4); return $n; }
+
+ /**
+ * Get the name of the component of the current class
+ *
+ * @return string component name
+ */
function getPluginComponent() { list($t, $p, $n, $c) = explode('_', get_class($this), 4); return (isset($c)?$c:''); }
// localisation methods
@@ -158,7 +164,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
* to try to minimise unnecessary loading of the strings when the plugin doesn't require them
* e.g. when info plugin is querying plugins for information about themselves.
*
- * @param $id id of the string to be retrieved
+ * @param string $id id of the string to be retrieved
* @return string string in appropriate language or english if not available
*/
function getLang($id) {
@@ -173,7 +179,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
* retrieve a language dependent wiki page and pass to xhtml renderer for display
* plugin equivalent of p_locale_xhtml()
*
- * @param $id id of language dependent wiki page
+ * @param string $id id of language dependent wiki page
* @return string parsed contents of the wiki page in xhtml format
*/
function locale_xhtml($id) {