1<?php
2
3namespace Sabre\HTTP;
4
5use Sabre\URI;
6
7/**
8 * URL utility class
9 *
10 * Note: this class is deprecated. All its functionality moved to functions.php
11 * or sabre\uri.
12 *
13 * @deprecated
14 * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
15 * @author Evert Pot (http://evertpot.com/)
16 * @license http://sabre.io/license/ Modified BSD License
17 */
18class URLUtil {
19
20    /**
21     * Encodes the path of a url.
22     *
23     * slashes (/) are treated as path-separators.
24     *
25     * @deprecated use \Sabre\HTTP\encodePath()
26     * @param string $path
27     * @return string
28     */
29    static function encodePath($path) {
30
31        return encodePath($path);
32
33    }
34
35    /**
36     * Encodes a 1 segment of a path
37     *
38     * Slashes are considered part of the name, and are encoded as %2f
39     *
40     * @deprecated use \Sabre\HTTP\encodePathSegment()
41     * @param string $pathSegment
42     * @return string
43     */
44    static function encodePathSegment($pathSegment) {
45
46        return encodePathSegment($pathSegment);
47
48    }
49
50    /**
51     * Decodes a url-encoded path
52     *
53     * @deprecated use \Sabre\HTTP\decodePath
54     * @param string $path
55     * @return string
56     */
57    static function decodePath($path) {
58
59        return decodePath($path);
60
61    }
62
63    /**
64     * Decodes a url-encoded path segment
65     *
66     * @deprecated use \Sabre\HTTP\decodePathSegment()
67     * @param string $path
68     * @return string
69     */
70    static function decodePathSegment($path) {
71
72        return decodePathSegment($path);
73
74    }
75
76    /**
77     * Returns the 'dirname' and 'basename' for a path.
78     *
79     * @deprecated Use Sabre\Uri\split().
80     * @param string $path
81     * @return array
82     */
83    static function splitPath($path) {
84
85        return Uri\split($path);
86
87    }
88
89    /**
90     * Resolves relative urls, like a browser would.
91     *
92     * @deprecated Use Sabre\Uri\resolve().
93     * @param string $basePath
94     * @param string $newPath
95     * @return string
96     */
97    static function resolve($basePath, $newPath) {
98
99        return Uri\resolve($basePath, $newPath);
100
101    }
102
103}
104