Mark V
1: <?php
2: namespace MOC\V\Core\HttpKernel\Component;
3:
4: /**
5: * Interface IBridgeInterface
6: *
7: * @package MOC\V\Core\HttpKernel\Component
8: */
9: interface IBridgeInterface
10: {
11:
12: /**
13: * Returns the root path from which this request is executed.
14: *
15: * Suppose that an index.php file instantiates this request object:
16: *
17: * - http://localhost/index.php returns an empty string
18: * - http://localhost/index.php/page returns an empty string
19: * - http://localhost/web/index.php returns '/web'
20: * - http://localhost/we%20b/index.php returns '/we%20b'
21: *
22: * @return string
23: */
24: public function getPathBase();
25:
26: /**
27: * Returns the path being requested relative to the executed script.
28: *
29: * The path info always starts with a /.
30: *
31: * Suppose this request is instantiated from /mysite on localhost:
32: *
33: * - http://localhost/mysite returns an empty string
34: * - http://localhost/mysite/about returns '/about'
35: * - http://localhost/mysite/enco%20ded returns '/enco%20ded'
36: * - http://localhost/mysite/about?var=1 returns '/about'
37: *
38: * @return string
39: */
40: public function getPathInfo();
41:
42: /**
43: * Returns the root URL from which this request is executed.
44: *
45: * The base URL never ends with a /.
46: *
47: * This is similar to getPathBase(),
48: * except that it also includes the script filename (e.g. index.php) if one exists.
49: *
50: * @return string
51: */
52: public function getUrlBase();
53:
54: /**
55: * Returns the requested URI.
56: *
57: * @return string
58: */
59: public function getUrl();
60:
61: /**
62: * Returns the port on which the request is made.
63: *
64: * This method can read the client port from the "X-Forwarded-Port" header,
65: * when trusted proxies were set via "setTrustedProxies()".
66: *
67: * The "X-Forwarded-Port" header must contain the client port.
68: *
69: * If your reverse proxy uses a different header name than "X-Forwarded-Port",
70: * configure it via "setTrustedHeaderName()" with the "client-port" key.
71: *
72: * @return int
73: */
74: public function getPort();
75:
76: /**
77: * @return array
78: */
79: public function getParameterArray();
80:
81: /**
82: * Returns the host name.
83: *
84: * This method can read the client port from the "X-Forwarded-Host" header
85: * when trusted proxies were set via "setTrustedProxies()".
86: *
87: * The "X-Forwarded-Host" header must contain the client host name.
88: *
89: * If your reverse proxy uses a different header name than "X-Forwarded-Host",
90: * configure it via "setTrustedHeaderName()" with the "client-host" key.
91: *
92: * @return string
93: */
94: public function getHost();
95: /*
96: * * getRequestUri
97: * * getUri
98: * * getUriForPath
99: */
100: }
101: