WPR FM
uid=9814(b13i2mwmyrdbxio) php=8.4.28
info
cwd /data/sites/web/b13i2mwmyrdbxio/www |
naik
Buka
-
class-encode.php
2526
x
-
class-matcher.php
1392
x
-
class-path.php
2938
x
-
class-query.php
12467
x
-
class-request.php
2142
x
-
class-source-flags.php
6654
x
-
class-transform.php
2490
x
-
class-url.php
1027
x
Upload
Simpan
<?php namespace Redirection\Url; /** * Get a URL suitable for matching in the database */ class Matcher { /** * URL * * @var string */ private $url; /** * Constructor * * @param string $url The URL to match. */ public function __construct( $url ) { $this->url = $url; } /** * Get the plain 'matched' URL: * * - Lowercase * - No trailing slashes * * @return string URL */ public function get_url() { // Remove query params, and decode any encoded characters $url = new Path( $this->url ); $path = $url->get_without_trailing_slash(); // URL encode $decode = [ '/', ':', '[', ']', '@', '~', ',', '(', ')', ';', ]; // URL encode everything - this converts any i10n to the proper encoding $path = rawurlencode( $path ); // We also converted things we dont want encoding, such as a /. Change these back foreach ( $decode as $char ) { $path = str_replace( rawurlencode( $char ), $char, $path ); } // Lowercase everything $path = Path::to_lower( $path ); return $path === '' ? '/' : $path; } /** * Get the URL with parameters re-ordered into alphabetical order * * @return string */ public function get_url_with_params() { $query = new Query( $this->url, new SourceFlags( [ SourceFlags::FLAG_CASE => true ] ) ); return $query->get_url_with_query( $this->get_url() ); } }
Exec