Download the PHP package zhanguangcheng/linkerman without Composer
On this page you can find all versions of the php package zhanguangcheng/linkerman. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zhanguangcheng/linkerman
More information about zhanguangcheng/linkerman
Files in zhanguangcheng/linkerman
Package linkerman
Short Description Linkerman is a library that utilizes Workerman to accelerate PHP frameworks.
License MIT
Homepage https://github.com/zhanguangcheng/linkerman
Informations about the package linkerman
Linkerman
Linkerman is a library that utilizes Workerman to accelerate PHP frameworks.
If your app or fw use a Front Controller, 99% that will work. Requires minimun PHP 8.0.
How it works
- When the request arrives, the Workerman's Request object is called to register the hyperglobal variables:
$_GET
$_POST
$_COOKIE
$_FILES
$_SERVER
$_REQUEST
- Rewrite the built-in PHP functions such as
header()
setcookie()
session_*
, etc., and convert them into Workerman's Response objects
Example of framework launch template
Installation
You can install Linkerman via Composer:
Requirements
- PHP >= 8.0
Usage
server.php
The Yii2 framework's start.php looks like this
Add to php.ini file
Start the service
Precautions
Functions or statements that are known to be incompatible
https://www.workerman.net/doc/workerman/appendices/unavailable-functions.html
pcntl_fork()
- Solution: Set the number of processes in advance
exit()
die()
- Solution: Replace with function
exit_exception()
- Solution: Replace with function
file_get_contents("php://input")
- Solution: Replace with function
request_raw_body()
- Solution: Replace with function
register_shutdown_function()
- Why: Since the resident memory runs, the registered callback function is not actually executed, which may lead to memory leaks
- Solution: Replace with function `register_shutdown_function_user()
How to access the Connection Object and Request Object of Workerman
`
License
Linkerman is open-sourced software licensed under the MIT license.
Security Vulnerabilities
If you discover a security vulnerability within Linkerman, Please submit an issue or send an e-mail to zhanguangcheng at [email protected]. All security vulnerabilities will be promptly addressed.
Tests
You can run the tests with:
References
More Information
You can find more information about Linkerman and its usage on the homepage.
This README.md file is generated based on the provided composer.json. Please make sure to update it with the relevant information and usage instructions for the Linkerman library.