[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
Utilities for collecting data from config files
Author: | Harry Fuecks |
License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
File Size: | 474 lines (14 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
mimetype($file, $knownonly=true) X-Ref |
Returns the (known) extension and mimetype of a given filename If $knownonly is true (the default), then only known extensions are returned. author: Andreas Gohr <andi@splitbrain.org> param: string $file file name param: bool $knownonly return: array with extension, mimetype and if it should be downloaded |
getMimeTypes() X-Ref |
returns a hash of mimetypes author: Andreas Gohr <andi@splitbrain.org> |
getAcronyms() X-Ref |
returns a hash of acronyms author: Harry Fuecks <hfuecks@gmail.com> |
getSmileys() X-Ref |
returns a hash of smileys author: Harry Fuecks <hfuecks@gmail.com> |
getEntities() X-Ref |
returns a hash of entities author: Harry Fuecks <hfuecks@gmail.com> |
getInterwiki() X-Ref |
returns a hash of interwikilinks author: Harry Fuecks <hfuecks@gmail.com> |
getCdnUrls() X-Ref |
Returns the jquery script URLs for the versions defined in lib/scripts/jquery/versions return: array |
getWordblocks() X-Ref |
returns array of wordblock patterns |
getSchemes() X-Ref |
Gets the list of configured schemes return: array the schemes |
linesToHash($lines, $lower = false) X-Ref |
Builds a hash from an array of lines If $lower is set to true all hash keys are converted to lower case. author: Harry Fuecks <hfuecks@gmail.com> author: Andreas Gohr <andi@splitbrain.org> author: Gina Haeussge <gina@foosel.net> param: array $lines param: bool $lower return: array |
confToHash($file,$lower=false) X-Ref |
Builds a hash from a configfile If $lower is set to true all hash keys are converted to lower case. author: Harry Fuecks <hfuecks@gmail.com> author: Andreas Gohr <andi@splitbrain.org> author: Gina Haeussge <gina@foosel.net> param: string $file param: bool $lower return: array |
jsonToArray($file) X-Ref |
Read a json config file into an array param: string $file return: array |
retrieveConfig($type,$fn,$params=null,$combine='array_merge') X-Ref |
Retrieve the requested configuration information author: Chris Smith <chris@jalakai.co.uk> 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 $params optional additional params to pass to the callback param: callback $combine the function used to combine arrays of values read from different configuration files; return: array configuration values |
getConfigFiles($type) X-Ref |
Include the requested configuration information author: Chris Smith <chris@jalakai.co.uk> param: string $type the configuration settings to be read, must correspond to a key/array in $config_cascade return: array list of files, default before local before protected |
actionOK($action) X-Ref |
check if the given action was disabled in config author: Andreas Gohr <andi@splitbrain.org> param: string $action returns: boolean true if enabled, false if disabled |
useHeading($linktype) X-Ref |
check if headings should be used as link text for the specified link type author: Chris Smith <chris@jalakai.co.uk> param: string $linktype 'content'|'navigation', content applies to links in wiki text return: boolean true if headings should be used for $linktype, false otherwise |
conf_encodeString($str,$code) X-Ref |
obscure config data so information isn't plain text param: string $str data to be encoded param: string $code encoding method, values: plain, base64, uuencode. return: string the encoded value |
conf_decodeString($str) X-Ref |
return obscured data as plain text param: string $str encoded data return: string plain text |
array_merge_with_removal($current, $new) X-Ref |
array combination function to remove negated values (prefixed by !) param: array $current param: array $new return: array the combined array, numeric keys reset |