alexkratky/requestx
Composer 安装命令:
composer require alexkratky/requestx
包简介
Class to work with HTTP requests and HTTP methods.
README 文档
README
Class to work with HTTP requests.
Installation
composer require alexkratky/RequestX
Functions
The class have following functions:
getUrl(): URL- Returns URL object.getQuery(string $key = null)- Returns variable provided to the script via URL query ($_GET). If no key is passed, returns the entire array. If key does not exists, returns null.getPost(string $key = null)- Returns variable provided to the script via POST method ($_POST). If no key is passed, returns the entire array.getHeader(string $header): ?string- Return the value of the HTTP header. Pass the header name as the plain, HTTP-specified header name (e.g. 'Accept-Encoding').getHeaders(): array- Returns all HTTP headers.getReferer(): ?string- Returns referrer.isSecured(): bool- Is the request over HTTPS?isAjax(): bool- Is AJAX request?getRemoteAddress(): ?string- Returns the IP address of the remote client.detectLanguage(array $langs): ?string- Parse Accept-Language header and returns preferred language.getMostPreferredLanguage(): ?string- Return most preferred language.getClientID()- Return clients Unique ID.workWith(string $method, array $vars): bool- Checks if are all of $vars isset(). The $method is GET ($_GET) or POST ($_POST)
统计信息
- 总下载量: 44
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: BSD
- 更新时间: 2019-09-13