Source for file Uri.php
Documentation is available at Uri.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 11: */
- 15: /**
- 16: * URI Syntax (RFC 3986).
- 17: *
- 18: * <pre>
- 19: * http://user:password@nettephp.com:8042/en/manual.html?name=param#fragment
- 20: * \__/^^^\_____________________________/\_____________/^\________/^\______/
- 21: * | | | | |
- 22: * scheme authority path query fragment
- 23: * </pre>
- 24: *
- 25: * - authority: [user[:password]@]host[:port]
- 26: * - hostUri: http://user:password@nettephp.com:8042
- 27: *
- 30: *
- 42: */
- 44: {
- 80: /**
- 83: */
- 85: {
- 90: }
- 94: }
- 98: }
- 103: }
- 104: }
- 105: }
- 109: /**
- 110: * Sets the scheme part of URI.
- 113: */
- 115: {
- 119: }
- 123: /**
- 124: * Returns the scheme part of URI.
- 126: */
- 128: {
- 130: }
- 134: /**
- 135: * Sets the user name part of URI.
- 138: */
- 140: {
- 144: }
- 148: /**
- 149: * Returns the user name part of URI.
- 151: */
- 153: {
- 155: }
- 159: /**
- 160: * Sets the password part of URI.
- 163: */
- 165: {
- 169: }
- 173: /**
- 174: * Returns the password part of URI.
- 176: */
- 178: {
- 180: }
- 184: /**
- 186: */
- 188: {
- 191: }
- 195: /**
- 197: */
- 199: {
- 202: }
- 206: /**
- 207: * Sets the host part of URI.
- 210: */
- 212: {
- 216: }
- 220: /**
- 221: * Returns the host part of URI.
- 223: */
- 225: {
- 227: }
- 231: /**
- 232: * Sets the port part of URI.
- 235: */
- 237: {
- 241: }
- 245: /**
- 246: * Returns the port part of URI.
- 248: */
- 250: {
- 252: }
- 256: /**
- 257: * Sets the path part of URI.
- 260: */
- 262: {
- 266: }
- 270: /**
- 271: * Returns the path part of URI.
- 273: */
- 275: {
- 277: }
- 281: /**
- 282: * Sets the query part of URI.
- 285: */
- 287: {
- 291: }
- 295: /**
- 296: * Appends the query part of URI.
- 299: */
- 301: {
- 305: }
- 309: /**
- 310: * Returns the query part of URI.
- 312: */
- 314: {
- 316: }
- 320: /**
- 321: * Sets the fragment part of URI.
- 324: */
- 326: {
- 330: }
- 334: /**
- 335: * Returns the fragment part of URI.
- 337: */
- 339: {
- 341: }
- 345: /**
- 346: * Returns the entire URI including query string and fragment.
- 348: */
- 350: {
- 354: }
- 358: /**
- 359: * Returns the [user[:pass]@]host[:port] part of URI.
- 361: */
- 363: {
- 365: if ($this->port && isset(self::$defaultPorts[$this->scheme]) && $this->port !== self::$defaultPorts[$this->scheme]) {
- 367: }
- 371: }
- 374: }
- 378: /**
- 379: * Returns the scheme and authority part of URI.
- 381: */
- 383: {
- 385: }
- 389: /**
- 390: * URI comparsion (this object must be in canonical form).
- 393: */
- 395: {
- 396: // compare host + path
- 406: }
- 408: // compare query strings
- 411: }
- 415: /**
- 416: * Transform to canonical form.
- 418: */
- 420: {
- 425: }
- 429: /**
- 431: */
- 433: {
- 435: }
- 439: /**
- 440: * Similar to rawurldecode, but preserve reserved chars encoded.
- 444: */
- 446: {
- 447: // reserved (@see RFC 2396) = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","
- 448: // within a path segment, the characters "/", ";", "=", "?" are reserved
- 449: // within a query component, the characters ";", "/", "?", ":", "@", "&", "=", "+", ",", "$" are reserved.
- 450: preg_match_all('#(?<=%)[a-f0-9][a-f0-9]#i', $s, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
- 455: }
- 456: }
- 458: }
- 460: }