11 $partsDump = print_r( $parts,
true );
15 "Testing $partsDump assembles to $output"
39 'host' =>
'example.com',
41 'example.com:123' => [
42 'host' =>
'example.com',
47 'host' =>
'example.com',
49 'id@example.com:123' => [
51 'host' =>
'example.com',
54 'id:key@example.com' => [
57 'host' =>
'example.com',
59 'id:key@example.com:123' => [
62 'host' =>
'example.com',
68 foreach ( $schemes as $scheme => $schemeParts ) {
69 foreach ( $hosts as $host => $hostParts ) {
70 foreach ( [
'',
'/path' ] as $path ) {
71 foreach ( [
'',
'query' ] as
$query ) {
72 foreach ( [
'',
'fragment' ] as $fragment ) {
82 $parts[
'path'] =
$path;
89 $parts[
'fragment'] = $fragment;
90 $url .=
'#' . $fragment;
103 $complexURL =
'http://id:key@example.org:321' .
104 '/over/there?name=ferret&foo=bar#nose';
wfParseUrl( $url)
parse_url() work-alike, but non-broken.
wfAssembleUrl( $urlParts)
This function will reassemble a URL parsed with wfParseURL.
GlobalFunctions wfAssembleUrl.
testWfAssembleUrl( $parts, $output)
provideURLParts
static provideURLParts()
Provider of URL parts for testing wfAssembleUrl()
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title after the basic globals have been set but before ordinary actions take place $output
null for the local wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query