[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Parser to extract query parameters out of REQUEST_URI paths. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 399 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 2 times |
Includes or requires: | 0 files |
PathRouter:: (7 methods):
doAdd()
add()
addStrict()
sortByWeight()
makeWeight()
parse()
extractTitle()
PathRouterPatternReplacer:: (2 methods):
replace()
callback()
Class: PathRouter - X-Ref
PathRouter class.doAdd( $path, $params, $options, $key = null ) X-Ref |
Protected helper to do the actual bulk work of adding a single pattern. This is in a separate method so that add() can handle the difference between a single string $path and an array() $path that contains multiple path patterns each with an associated $key to pass on. param: string $path param: array $params param: array $options param: null|string $key |
add( $path, $params = array() X-Ref |
Add a new path pattern to the path router param: string|array $path The path pattern to add param: array $params The params for this path pattern param: array $options The options for this path pattern |
addStrict( $path, $params = array() X-Ref |
Add a new path pattern to the path router with the strict option on param: string|array $path param: array $params param: array $options |
sortByWeight() X-Ref |
Protected helper to re-sort our patterns so that the most specific (most heavily weighted) patterns are at the start of the array. |
makeWeight( $pattern ) X-Ref |
param: object $pattern return: float|int |
parse( $path ) X-Ref |
Parse a path and return the query matches for the path param: string $path The path to parse return: array The array of matches for the path |
extractTitle( $path, $pattern ) X-Ref |
param: string $path param: string $pattern return: array|null |
Class: PathRouterPatternReplacer - X-Ref
replace( $value ) X-Ref |
Replace keys inside path router patterns with text. We do this inside of a replacement callback because after replacement we can't tell the difference between a $1 that was not replaced and a $1 that was part of the content a $1 was replaced with. param: string $value return: string |
callback( $m ) X-Ref |
param: array $m return: string |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |