PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / 1.3.2
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel v1.3.2
trunk 0.9.0 0.9.1 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0
wp-all-export / src / Http / Request.php
wp-all-export / src / Http Last commit date
JsonResponse.php 9 years ago Request.php 9 years ago Response.php 8 years ago Router.php 8 years ago
Request.php
42 lines
1 <?php
2
3 namespace Wpae\Http;
4
5
6 class Request
7 {
8 private $content;
9
10 public function __construct($content)
11 {
12 $this->content = $content;
13 }
14
15 public function getRawContent()
16 {
17 return $this->content;
18 }
19
20 public function getJsonParams()
21 {
22 if(!empty($this->content) && $this->content !== "null") {
23
24 $jsonDecodedContent = json_decode($this->content, true);
25
26 if (is_null($jsonDecodedContent)) {
27 throw new \Exception('Invalid JON Provided');
28 }
29
30 return $jsonDecodedContent;
31 }
32 }
33
34 public function get($element, $default = null)
35 {
36 if(isset($_GET[$element])) {
37 return $_GET[$element];
38 } else {
39 return $default;
40 }
41 }
42 }