src/ApiBundle/Api/ApiRequest.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace ApiBundle\Api;
use Symfony\Component\HttpFoundation\HeaderBag;
use Symfony\Component\HttpFoundation\ParameterBag;
class ApiRequest
{
/**
* @var ParameterBag
*/
public $query;
/**
* @var ParameterBag
*/
public $request;
/**
* @var HeaderBag
*/
public $headers;
private $pathInfo;
private $method;
private $httpRequest;
public function __construct($pathInfo, $method, $query = array(), $request = array(), $headers = null, $httpRequest = null)
{
$this->pathInfo = $pathInfo;
$this->method = $method;
$this->headers = $headers;
if ($query instanceof ParameterBag) {
$this->query = $query;
} else {
$this->query = new ParameterBag($query);
}
if ($request instanceof ParameterBag) {
$this->request = $request;
} else {
$this->request = new ParameterBag($request);
}
$this->httpRequest = $httpRequest;
}
public function getPathInfo()
{
return $this->pathInfo;
}
public function getMethod()
{
return $this->method;
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。