File tree 4 files changed +16
-10
lines changed
4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
- ` Fixed ` for any bug fixes.
13
13
- ` Security ` in case of vulnerabilities
14
14
15
+ ## [ 2.0.0] - 2020.11.06
16
+
17
+ ### Changed
18
+
19
+ - Renamed methods ` getContent ` and ` hasContent ` to ` getBody ` and ` hasBody ` respectively, as this more accurately depicts the HTTP request element.
20
+
15
21
## [ 1.3.0] - 2020.09.14
16
22
17
23
### Added
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ composer require bayfrontmedia/php-http-request
54
54
- [ hasCookie] ( #hascookie )
55
55
- [ getHeader] ( #getheader )
56
56
- [ hasHeader] ( #hasheader )
57
- - [ getContent ] ( #getcontent )
58
- - [ hasContent ] ( #hascontent )
57
+ - [ getBody ] ( #getbody )
58
+ - [ hasBody ] ( #hasbody )
59
59
60
60
** Specific values**
61
61
@@ -620,7 +620,7 @@ if (Request::hasHeader('Content-Type')) {
620
620
621
621
<hr />
622
622
623
- ### getContent
623
+ ### getBody
624
624
625
625
** Description:**
626
626
@@ -639,12 +639,12 @@ Returns content body of a request.
639
639
```
640
640
use Bayfront\HttpRequest\Request;
641
641
642
- print_r(Request::getContent ());
642
+ print_r(Request::getBody ());
643
643
```
644
644
645
645
<hr />
646
646
647
- ### hasContent
647
+ ### hasBody
648
648
649
649
** Description:**
650
650
@@ -663,7 +663,7 @@ Checks if content body of a request exists.
663
663
```
664
664
use Bayfront\HttpRequest\Request;
665
665
666
- if (Request::hasContent ()) {
666
+ if (Request::hasBody ()) {
667
667
// Do something
668
668
}
669
669
```
Original file line number Diff line number Diff line change 38
38
],
39
39
"require" : {
40
40
"php" : " >=7.1.0" ,
41
- "bayfrontmedia/php-array-helpers" : " ^1.0.0 " ,
41
+ "bayfrontmedia/php-array-helpers" : " ^1.0.1 " ,
42
42
"bayfrontmedia/php-validator" : " ^1.0.0"
43
43
},
44
44
"autoload" : {
Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ public static function hasHeader(string $key): bool
416
416
* @return string
417
417
*/
418
418
419
- public static function getContent (): string
419
+ public static function getBody (): string
420
420
{
421
421
return file_get_contents ('php://input ' );
422
422
}
@@ -427,9 +427,9 @@ public static function getContent(): string
427
427
* @return bool
428
428
*/
429
429
430
- public static function hasContent (): bool
430
+ public static function hasBody (): bool
431
431
{
432
- return (self ::getContent ()) ? true : false ;
432
+ return (self ::getBody ()) ? true : false ;
433
433
}
434
434
435
435
/*
You can’t perform that action at this time.
0 commit comments