summaryrefslogtreecommitdiff
path: root/inc/plugin.php
diff options
context:
space:
mode:
authorGerrit Uitslag <klapinklapin@gmail.com>2014-10-01 11:30:27 +0200
committerGerrit Uitslag <klapinklapin@gmail.com>2014-10-01 11:30:27 +0200
commit42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0 (patch)
treed9cbd3d10d6b30e6b2092e39922b60e8616b4f92 /inc/plugin.php
parent59bc3b48fdffb76ee65a4b630be3ffa1f6c20c80 (diff)
downloadrpg-42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0.tar.gz
rpg-42ea7f447f39fbc2f79eaaec31f8c10ede59c5d0.tar.bz2
Many PHPDocs, some unused and dyn declared vars
many PHPDocs some unused variables some dynamically declared variables declared
Diffstat (limited to 'inc/plugin.php')
-rw-r--r--inc/plugin.php45
1 files changed, 35 insertions, 10 deletions
diff --git a/inc/plugin.php b/inc/plugin.php
index fbfc0325f..8432b21b2 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -48,14 +48,25 @@ class DokuWiki_Plugin {
// plugin introspection methods
// extract from class name, format = <plugin type>_plugin_<name>[_<component name>]
+ /**
+ * @return string plugin type
+ */
function getPluginType() {
list($t) = explode('_', get_class($this), 2);
return $t;
}
+
+ /**
+ * @return string plugin name
+ */
function getPluginName() {
list($t, $p, $n) = explode('_', get_class($this), 4);
return $n;
}
+
+ /**
+ * @return string component name
+ */
function getPluginComponent() {
list($t, $p, $n, $c) = explode('_', get_class($this), 4);
return (isset($c)?$c:'');
@@ -91,9 +102,11 @@ class DokuWiki_Plugin {
}
/**
- * localFN($id)
- * prepends appropriate path for a language dependent filename
+ * Prepends appropriate path for a language dependent filename
* plugin equivalent of localFN()
+ *
+ * @param string $id id of localization file
+ * @return string wiki text
*/
function localFN($id) {
global $conf;
@@ -110,9 +123,8 @@ class DokuWiki_Plugin {
}
/**
- * setupLocale()
- * reads all the plugins language dependent strings into $this->lang
- * this function is automatically called by getLang()
+ * Reads all the plugins language dependent strings into $this->lang
+ * this function is automatically called by getLang()
*/
function setupLocale() {
if ($this->localised) return;
@@ -196,8 +208,7 @@ class DokuWiki_Plugin {
*
* @param string $name name of plugin to load
* @param bool $msg if a message should be displayed in case the plugin is not available
- *
- * @return object helper plugin object
+ * @return DokuWiki_Plugin|null helper plugin object
*/
function loadHelper($name, $msg = true){
$obj = plugin_load('helper',$name);
@@ -211,6 +222,12 @@ class DokuWiki_Plugin {
/**
* email
* standardised function to generate an email link according to obfuscation settings
+ *
+ * @param string $email
+ * @param string $name
+ * @param string $class
+ * @param string $more
+ * @return string html
*/
function email($email, $name='', $class='', $more='') {
if (!$email) return $name;
@@ -223,6 +240,13 @@ class DokuWiki_Plugin {
/**
* external_link
* standardised function to generate an external link according to conf settings
+ *
+ * @param string $link
+ * @param string $title
+ * @param string $class
+ * @param string $target
+ * @param string $more
+ * @return string
*/
function external_link($link, $title='', $class='', $target='', $more='') {
global $conf;
@@ -247,8 +271,9 @@ class DokuWiki_Plugin {
* Instead use render_text()
*
* @deprecated 2014-01-22
- * @param $name
- * @param $arguments
+ *
+ * @param string $name
+ * @param array $arguments
* @return null|string
*/
function __call($name, $arguments) {
@@ -265,7 +290,7 @@ class DokuWiki_Plugin {
* output text string through the parser, allows dokuwiki markup to be used
* very ineffecient for small pieces of data - try not to use
*
- * @param string $text wiki markup to parse
+ * @param string $text wiki markup to parse
* @param string $format output format
* @return null|string
*/