Download the PHP package jinexus-framework/jinexus-http without Composer
On this page you can find all versions of the php package jinexus-framework/jinexus-http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jinexus-framework/jinexus-http
More information about jinexus-framework/jinexus-http
Files in jinexus-framework/jinexus-http
Package jinexus-http
Short Description HTTP component from JiNexus Framework
License BSD-3-Clause
Homepage https://github.com/jinexus-framework/jinexus-http
Informations about the package jinexus-http
JiNexus Http
JiNexus Http provides an object-oriented interface over PHP's HTTP request
super-globals — $_GET, $_POST, $_FILES, $_COOKIE, and $_SERVER — along with
convenient access to common request information such as whether the request is an Ajax
call, whether it is served over HTTPS, and the base URL.
Request data is injected at construction and falls back to the super-globals when a key is omitted, so the component is easy to test and does not read global state once you pass it an explicit request array.
- Documentation: https://framework.jinexus.com/documentation
- Issues: https://github.com/jinexus-framework/jinexus-http/issues
Requirements
- PHP
^8.5
Installation
Install via Composer:
Usage
Creating a request
The parameter bags
Each of cookie, file, post, query, and server is a Parameter bag:
Note the mapping:
$request->queryis built from thegetkey (and$_GET), not from aquerykey.
Request helpers
The HTTP container
Error handling
Package-level failures throw JiNexus\Http\HttpException (a subclass of \Exception).
For example, an unsupported magic getter/setter resolved through AbstractBase::__call
throws a HttpException with a Not implemented: … message.
Extending
Request and Http are deliberately empty subclasses of AbstractRequest and
AbstractHttp. Keep them that way — the public accessors are implemented with PHP
property hooks over backing fields, and declaring a real property would shadow them. For
IDE autocompletion, prefer @property PHPDoc tags over real properties.
Testing
phpunit.dist.xml is the committed configuration. Use XDEBUG_MODE=off to silence the
local Xdebug notice, and --testdox for readable output:
Contributing
Please see CONDUCT.md for the code of conduct. Contributions should include
tests and a CHANGELOG.md entry. See AGENTS.md for detailed build, style,
and workflow conventions.
License
BSD-3-Clause. See LICENSE.md.