PluginProbe
Depicter — Popup & Slider Builder / 1.2.0
Depicter — Popup & Slider Builder v1.2.0
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
depicter / vendor / htmlburger / wpemerge / src / Requests / RequestInterface.php

RequestInterface.php in Depicter — Popup & Slider Builder 1.2.0, at vendor/htmlburger/wpemerge/src/Requests/RequestInterface.php

152 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package WPEmerge
4 * @author Atanas Angelov <hi@atanas.dev>
5 * @copyright 2017-2019 Atanas Angelov
6 * @license https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0
7 * @link https://wpemerge.com/
8 */
9
10 namespace WPEmerge\Requests;
11
12 use Psr\Http\Message\ServerRequestInterface;
13
14 /**
15 * A representation of a request to the server.
16 */
17 interface RequestInterface extends ServerRequestInterface {
18 /**
19 * Alias for ::getUri().
20 * Even though URI and URL are slightly different things this alias returns the URI for simplicity/familiarity.
21 *
22 * @return string
23 */
24 public function getUrl();
25
26 /**
27 * Check if the request method is GET.
28 *
29 * @return boolean
30 */
31 public function isGet();
32
33 /**
34 * Check if the request method is HEAD.
35 *
36 * @return boolean
37 */
38 public function isHead();
39
40 /**
41 * Check if the request method is POST.
42 *
43 * @return boolean
44 */
45 public function isPost();
46
47 /**
48 * Check if the request method is PUT.
49 *
50 * @return boolean
51 */
52 public function isPut();
53
54 /**
55 * Check if the request method is PATCH.
56 *
57 * @return boolean
58 */
59 public function isPatch();
60
61 /**
62 * Check if the request method is DELETE.
63 *
64 * @return boolean
65 */
66 public function isDelete();
67
68 /**
69 * Check if the request method is OPTIONS.
70 *
71 * @return boolean
72 */
73 public function isOptions();
74
75 /**
76 * Check if the request method is a "read" verb.
77 *
78 * @return boolean
79 */
80 public function isReadVerb();
81
82 /**
83 * Check if the request is an ajax request.
84 *
85 * @return boolean
86 */
87 public function isAjax();
88
89 /**
90 * Get a value from the request attributes.
91 *
92 * @param string $key
93 * @param mixed $default
94 * @return mixed
95 */
96 public function attributes( $key = '', $default = null );
97
98 /**
99 * Get a value from the request query (i.e. $_GET).
100 *
101 * @param string $key
102 * @param mixed $default
103 * @return mixed
104 */
105 public function query( $key = '', $default = null );
106
107 /**
108 * Get a value from the request body (i.e. $_POST).
109 *
110 * @param string $key
111 * @param mixed $default
112 * @return mixed
113 */
114 public function body( $key = '', $default = null );
115
116 /**
117 * Get a value from the COOKIE parameters.
118 *
119 * @param string $key
120 * @param mixed $default
121 * @return mixed
122 */
123 public function cookies( $key = '', $default = null );
124
125 /**
126 * Get a value from the FILES parameters.
127 *
128 * @param string $key
129 * @param mixed $default
130 * @return mixed
131 */
132 public function files( $key = '', $default = null );
133
134 /**
135 * Get a value from the SERVER parameters.
136 *
137 * @param string $key
138 * @param mixed $default
139 * @return mixed
140 */
141 public function server( $key = '', $default = null );
142
143 /**
144 * Get a value from the headers.
145 *
146 * @param string $key
147 * @param mixed $default
148 * @return mixed
149 */
150 public function headers( $key = '', $default = null );
151 }
152