PluginProbe ʕ •ᴥ•ʔ
Admin Columns / 7.0.13
Admin Columns v7.0.13
7.0.19 2.3.5 2.4 2.4.1 2.4.10 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.6.1 2.5.6.2 2.5.6.3 2.5.6.4 3.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.7 3.1 3.1.1 3.1.10 3.1.2 3.1.3 3.1.5 3.2.3 3.2.7 3.3.1 3.4.1 3.4.6 3.4.8 4.0.1 4.0.3 4.1.6 4.2.2 4.2.5 4.3 4.3.2 4.4.1 4.4.4 4.4.5 4.5.5 4.6.1 4.7.18 4.7.19 4.7.20 4.7.7 7.0.13 7.0.14 7.0.16 trunk 1.0 1.1 1.1.3 1.2 1.2.1 1.3 1.3.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.5.1 1.4.6 1.4.6.1 1.4.6.2 1.4.6.3 1.4.6.4 1.4.7 1.4.8 1.4.9 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2 2.2.1 2.2.1.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.5.1 2.2.6 2.2.6.1 2.2.6.2 2.2.6.3 2.2.6.4 2.2.7 2.2.8 2.2.8.1 2.2.9 2.3.1 2.3.2 2.3.3
codepress-admin-columns / classes / Request.php
codepress-admin-columns / classes Last commit date
Acf 3 months ago Admin 3 months ago Ajax 3 months ago ApplyFilter 3 months ago Asset 3 months ago Capabilities 3 months ago Check 3 months ago Collection 3 months ago Column 3 months ago ColumnFactories 3 months ago ColumnFactory 3 months ago ColumnIterator 3 months ago ColumnRepository 3 months ago ColumnSize 3 months ago DI 3 months ago Deprecated 3 months ago Entity 3 months ago Exception 3 months ago Expression 3 months ago Form 3 months ago Formatter 3 months ago Helper 3 months ago Integration 3 months ago ListScreenRepository 3 months ago ListTable 3 months ago Message 3 months ago Meta 3 months ago Nonce 3 months ago Notice 3 months ago Plugin 3 months ago Preferences 3 months ago Promo 3 months ago Request 3 months ago RequestHandler 3 months ago Response 3 months ago Sanitize 3 months ago Service 3 months ago Setting 3 months ago Settings 3 months ago Storage 3 months ago Table 3 months ago TableIdsFactory 3 months ago TableScreen 3 months ago TableScreenFactory 3 months ago ThirdParty 3 months ago Type 3 months ago Value 3 months ago View 3 months ago AdminColumns.php 3 months ago ArrayIterator.php 3 months ago Capabilities.php 3 months ago Collection.php 3 months ago CollectionFormatter.php 3 months ago Column.php 3 months ago ColumnCollection.php 3 months ago ColumnFactoryCollectionFactory.php 3 months ago ColumnFactoryDefinitionCollection.php 3 months ago ColumnGroups.php 3 months ago ColumnIterator.php 3 months ago ColumnNamesTrait.php 3 months ago ColumnRepository.php 3 months ago ColumnTypeRepository.php 3 months ago Config.php 3 months ago Container.php 3 months ago DateFormats.php 3 months ago Expirable.php 3 months ago Formatter.php 3 months ago FormatterCollection.php 3 months ago Helper.php 3 months ago ListScreen.php 3 months ago ListScreenCollection.php 3 months ago ListScreenRepository.php 3 months ago ListScreenRepositoryWritable.php 3 months ago ListTable.php 3 months ago ListTableFactory.php 3 months ago Loader.php 3 months ago Message.php 3 months ago MetaType.php 3 months ago Middleware.php 3 months ago OpCacheInvalidateTrait.php 3 months ago PluginActionLinks.php 3 months ago PluginActionUpgrade.php 3 months ago PostType.php 3 months ago PostTypeRepository.php 3 months ago Registerable.php 3 months ago Registry.php 3 months ago Renderable.php 3 months ago Request.php 3 months ago RequestAjaxHandler.php 3 months ago RequestAjaxHandlers.php 3 months ago RequestAjaxParser.php 3 months ago RequestHandler.php 3 months ago RequestHandlerFactory.php 3 months ago Screen.php 3 months ago Services.php 3 months ago TableIdsFactory.php 3 months ago TableScreen.php 3 months ago TableScreenFactory.php 3 months ago Taxonomy.php 3 months ago Transient.php 3 months ago TypedArrayIterator.php 3 months ago View.php 3 months ago WpListTableFactory.php 3 months ago
Request.php
77 lines
1 <?php
2
3 namespace AC;
4
5 use AC\Request\Parameters;
6
7 class Request
8 {
9
10 public const METHOD_POST = 'POST';
11 public const METHOD_GET = 'GET';
12
13 protected string $method;
14
15 protected Parameters $query;
16
17 protected Parameters $request;
18
19 /**
20 * @var Middleware[]
21 */
22 protected array $middleware;
23
24 public function __construct()
25 {
26 $this->method = $_SERVER['REQUEST_METHOD'] ?? '';
27 $this->query = new Parameters((array)filter_input_array(INPUT_GET));
28 $this->request = new Parameters((array)filter_input_array(INPUT_POST));
29 }
30
31 public function add_middleware(Middleware $middleware): self
32 {
33 $this->middleware[] = $middleware;
34
35 $middleware->handle($this);
36
37 return $this;
38 }
39
40 public function get_query(): Parameters
41 {
42 return $this->query;
43 }
44
45 public function get_request(): Parameters
46 {
47 return $this->request;
48 }
49
50 public function get_method(): string
51 {
52 return $this->method;
53 }
54
55 public function get_parameters(): Parameters
56 {
57 return $this->get_method() === self::METHOD_POST
58 ? $this->get_request()
59 : $this->get_query();
60 }
61
62 public function get(string $key, $default = null)
63 {
64 return $this->get_parameters()->get($key, $default);
65 }
66
67 public function has(string $key): bool
68 {
69 return $this->get_parameters()->has($key);
70 }
71
72 public function filter(string $key, $default = null, int $filter = FILTER_DEFAULT, $options = 0)
73 {
74 return $this->get_parameters()->filter($key, $default, $filter, $options);
75 }
76
77 }