diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/confutils.php | 11 | ||||
-rw-r--r-- | inc/indexer.php | 25 | ||||
-rw-r--r-- | inc/parser/parser.php | 6 | ||||
-rw-r--r-- | inc/parserutils.php | 15 |
4 files changed, 43 insertions, 14 deletions
diff --git a/inc/confutils.php b/inc/confutils.php index 29ead1e9f..edea80092 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -115,7 +115,11 @@ function getWordblocks() { return $wordblocks; } - +/** + * Gets the list of configured schemes + * + * @return array the schemes + */ function getSchemes() { static $schemes = null; if ( !$schemes ) { @@ -182,7 +186,7 @@ function confToHash($file,$lower=false) { * * @param string $type the configuration settings to be read, must correspond to a key/array in $config_cascade * @param callback $fn the function used to process the configuration file into an array - * @param array $param optional additional params to pass to the callback + * @param array $params optional additional params to pass to the callback * @return array configuration values */ function retrieveConfig($type,$fn,$params=null) { @@ -236,6 +240,7 @@ function actionOK($action){ static $disabled = null; if(is_null($disabled)){ global $conf; + /** @var auth_basic $auth */ global $auth; // prepare disabled actions array and handle legacy options @@ -272,7 +277,7 @@ function actionOK($action){ * * @param string $linktype 'content'|'navigation', content applies to links in wiki text * navigation applies to all other links - * @returns boolean true if headings should be used for $linktype, false otherwise + * @return boolean true if headings should be used for $linktype, false otherwise */ function useHeading($linktype) { static $useHeading = null; diff --git a/inc/indexer.php b/inc/indexer.php index c28499d68..321940508 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -463,8 +463,8 @@ class Doku_Indexer { * in the returned list is an array with the page names as keys and the * number of times that token appears on the page as value. * - * @param arrayref $tokens list of words to search for - * @return array list of page names with usage counts + * @param array $tokens list of words to search for + * @return array list of page names with usage counts * @author Tom N Harris <tnharris@whoopdedo.org> * @author Andreas Gohr <andi@splitbrain.org> */ @@ -615,9 +615,9 @@ class Doku_Indexer { * The $result parameter can be used to merge the index locations with * the appropriate query term. * - * @param arrayref $words The query terms. - * @param arrayref $result Set to word => array("length*id" ...) - * @return array Set to length => array(id ...) + * @param array $words The query terms. + * @param array $result Set to word => array("length*id" ...) + * @return array Set to length => array(id ...) * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function getIndexWords(&$words, &$result) { @@ -728,7 +728,7 @@ class Doku_Indexer { * * @param int $min bottom frequency threshold * @param int $max upper frequency limit. No limit if $max<$min - * @param int $length minimum length of words to count + * @param int $minlen minimum length of words to count * @param string $key metadata key to list. Uses the fulltext index if not given * @return array list of words as the keys and frequency as values * @author Tom N Harris <tnharris@whoopdedo.org> @@ -852,7 +852,8 @@ class Doku_Indexer { * * @param string $idx name of the index * @param string $suffix subpart identifier - * @param arrayref $linex list of lines without LF + * @param array $lines list of lines without LF + * @return bool If saving succeeded * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function saveIndex($idx, $suffix, &$lines) { @@ -902,6 +903,7 @@ class Doku_Indexer { * @param string $suffix subpart identifier * @param int $id the line number * @param string $line line to write + * @return bool If saving succeeded * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function saveIndexKey($idx, $suffix, $id, $line) { @@ -961,6 +963,11 @@ class Doku_Indexer { return $id; } + /** + * @param string $idx The index file which should be added to the key. + * @param string $suffix The suffix of the file + * @param bool $delete Unused + */ protected function cacheIndexDir($idx, $suffix, $delete=false) { global $conf; if ($idx == 'i') @@ -1263,8 +1270,8 @@ function idx_addPage($page, $verbose=false, $force=false) { * Important: No ACL checking is done here! All results are * returned, regardless of permissions * - * @param arrayref $words list of words to search for - * @return array list of pages found, associated with the search terms + * @param array $words list of words to search for + * @return array list of pages found, associated with the search terms */ function idx_lookup(&$words) { $Indexer = idx_get_indexer(); diff --git a/inc/parser/parser.php b/inc/parser/parser.php index cf132ce97..98fb7939c 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -52,6 +52,9 @@ class Doku_Parser { var $Handler; + /** + * @var Doku_Lexer $Lexer + */ var $Lexer; var $modes = array(); @@ -134,6 +137,9 @@ class Doku_Parser { */ class Doku_Parser_Mode { + /** + * @var Doku_Lexer $Lexer + */ var $Lexer; var $allowedModes = array(); diff --git a/inc/parserutils.php b/inc/parserutils.php index f182b84c4..107c42eb0 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -92,8 +92,11 @@ function p_wiki_xhtml($id, $rev='', $excuse=true){ * If $excuse is true an explanation is returned if the file * wasn't found * - * @param string wiki page id - * @param reference populated with page title from heading or page id + * @param string $id wiki page id + * @param string $title populated with page title from heading or page id + * @param string $rev revision string + * @param bool $excuse if an excuse shall be renderer when no content is found + * @return string xhtml code * @deprecated * @author Harry Fuecks <hfuecks@gmail.com> */ @@ -565,6 +568,7 @@ function p_get_parsermodes(){ global $PARSER_MODES; $obj = null; foreach($pluginlist as $p){ + /** @var DokuWiki_Syntax_Plugin $obj */ if(!$obj =& plugin_load('syntax',$p)) continue; //attempt to load plugin into $obj $PARSER_MODES[$obj->getType()][] = "plugin_$p"; //register mode type //add to modes @@ -675,7 +679,12 @@ function p_render($mode,$instructions,&$info){ return $Renderer->doc; } +/** + * @param $mode string Mode of the renderer to get + * @return null|Doku_Renderer The renderer + */ function & p_get_renderer($mode) { + /** @var Doku_Plugin_Controller $plugin_controller */ global $conf, $plugin_controller; $rname = !empty($conf['renderer_'.$mode]) ? $conf['renderer_'.$mode] : $mode; @@ -723,6 +732,7 @@ function & p_get_renderer($mode) { * METADATA_RENDER_USING_CACHE, * METADATA_RENDER_UNLIMITED * + * @return string|null The first heading * @author Andreas Gohr <andi@splitbrain.org> * @author Michael Hamann <michael@content-space.de> */ @@ -737,6 +747,7 @@ function p_get_first_heading($id, $render=METADATA_RENDER_USING_SIMPLE_CACHE){ * @param string $language language to provide highlighting * @param string $wrapper html element to wrap the returned highlighted text * + * @return string xhtml code * @author Christopher Smith <chris@jalakai.co.uk> * @author Andreas Gohr <andi@splitbrain.org> */ |