summaryrefslogtreecommitdiff
path: root/lib/plugins/info
diff options
context:
space:
mode:
authorGerrit Uitslag <klapinklapin@gmail.com>2014-10-01 15:32:05 +0200
committerGerrit Uitslag <klapinklapin@gmail.com>2014-10-01 15:32:05 +0200
commit253d4b48ec708eb42033862dc15c8576f44a48ed (patch)
treed8673e304f0deaacb7a20a31cba7b82744a00bed /lib/plugins/info
parent42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0 (diff)
downloadrpg-253d4b48ec708eb42033862dc15c8576f44a48ed.tar.gz
rpg-253d4b48ec708eb42033862dc15c8576f44a48ed.tar.bz2
more PHPDocs, unused var, small bit code reformatting
Diffstat (limited to 'lib/plugins/info')
-rw-r--r--lib/plugins/info/syntax.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php
index fc0e1af9d..773256faf 100644
--- a/lib/plugins/info/syntax.php
+++ b/lib/plugins/info/syntax.php
@@ -44,9 +44,14 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
$this->Lexer->addSpecialPattern('~~INFO:\w+~~',$mode,'plugin_info');
}
-
/**
* Handle the match
+ *
+ * @param string $match The text matched by the patterns
+ * @param int $state The lexer state for the match
+ * @param int $pos The character position of the matched text
+ * @param Doku_Handler $handler The Doku_Handler object
+ * @return array Return an array with all data you want to use in render
*/
function handle($match, $state, $pos, Doku_Handler $handler){
$match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end
@@ -55,6 +60,11 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* Create output
+ *
+ * @param string $format string output format being rendered
+ * @param Doku_Renderer $renderer the current renderer object
+ * @param array $data data created by handler()
+ * @return boolean rendered correctly?
*/
function render($format, Doku_Renderer $renderer, $data) {
if($format == 'xhtml'){
@@ -103,6 +113,9 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
* list all installed plugins
*
* uses some of the original renderer methods
+ *
+ * @param string $type
+ * @param Doku_Renderer_xhtml $renderer
*/
function _plugins_xhtml($type, Doku_Renderer_xhtml $renderer){
global $lang;
@@ -114,7 +127,7 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
// remove subparts
foreach($plugins as $p){
if (!$po = plugin_load($type,$p)) continue;
- list($name,$part) = explode('_',$p,2);
+ list($name,/* $part */) = explode('_',$p,2);
$plginfo[$name] = $po->getInfo();
}
@@ -141,6 +154,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
* list all installed plugins
*
* uses some of the original renderer methods
+ *
+ * @param Doku_Renderer_xhtml $renderer
*/
function _helpermethods_xhtml(Doku_Renderer_xhtml $renderer){
$plugins = plugin_list('helper');
@@ -189,6 +204,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* lists all known syntax types and their registered modes
+ *
+ * @return string
*/
function _syntaxtypes_xhtml(){
global $PARSER_MODES;
@@ -211,6 +228,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin {
/**
* lists all known syntax modes and their sorting value
+ *
+ * @return string
*/
function _syntaxmodes_xhtml(){
$modes = p_get_parsermodes();