1.2.954. PSR-7 Usage¶
It is supported by an set of interfaces, that one may use in the code.
<?php
namespace MyNamespace;
// MyServerRequest implements the PSR-7 ServerRequestInterface.
// MyServerRequest is more of a black hole than a real Server.
class MyServerRequest extends \Psr\Http\Message\ServerRequestInterface {
public function getServerParams() {}
public function getCookieParams() {}
public function withCookieParams(array $cookies) {}
public function getQueryParams() {}
public function withQueryParams(array $query) {}
public function getUploadedFiles() {}
public function withUploadedFiles(array $uploadedFiles) {}
public function getParsedBody() {}
public function withParsedBody($data) {}
public function getAttributes() {}
public function getAttribute($name, $default = null) {}
public function withAttribute($name, $value) {}
public function withoutAttribute($name) {}
}
?>
See also PSR-7 : HTTP message interfaces.
1.2.954.1. Specs¶
Short name |
Psr/Psr7Usage |
Rulesets |
|
Exakat since |
0.11.6 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Features |
psr |
Available in |