Download the PHP package lizhichao/one without Composer
On this page you can find all versions of the php package lizhichao/one. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lizhichao/one
More information about lizhichao/one
Files in lizhichao/one
Informations about the package one
One - A minimalist high-performance php framework that supports the [swoole | php-fpm] environment
- Fast - can respond to requests within
1ms
even underphp-fpm
- Simple - let you focus on what you do with
one
instead of how to useone
- Flexible - each component is loosely coupled, can be flexibly matched and used, and the method of use is consistent
- Native sql can be used with model relation
with
, relation can cross database types - session can be used under http, websocket or even tcp, udp and cli
- ...
- Native sql can be used with model relation
- High efficiency - operational performance, development efficiency, and easy maintenance.
- Lightweight - no other dependencies, the total code amount of all components from routing and orm does not exceed 500k. If there is no complicated calling relationship in secondary development, you can quickly grasp the design principle
- Sub-database and sub-table - Supports wireless sub-database and table, and the upper-layer usage method remains the same
hello world
install
performance
reference:
Main components
- Router
- Support greedy matching and priority
- Support ws/tcp/http……any protocol
- Good performance, adding tens of thousands of routes will not reduce the parsing performance
- Routing grouping, middleware...all there should be
- ORM
- Support database: mysql, clickHouse,
- Relation processing: one-to-one, one-to-many, many-to-one, polymorphism... There are various relations, which can be related across database types
- Cache: Automatically refresh data, support configuration of various cache granularities
- Event: All operations can be captured, including you use native SQL to operate the database
- Database connection: synchronous, asynchronous, blocking, disconnection and reconnection are all supported
- sql template: automatically generate template id, you can understand what types of sql the project has, and the proportion of the number of calls, and provide data support for later data optimization.
- Statement reuse: Provide SQL execution performance
- The model supports dynamic sub-database sub-table and massive data
- rpc
- Can automatically generate remote method mapping, support ide prompt
- Direct call mapping method == call remote method, support chain call
- Support
rpc middleware
, authentication, encryption and decryption, caching...
- Log
- Complete information: record the complete file name + line number to quickly locate the code location
- requestId: You can easily view the entire request log information and service relationship
Router
orm
Define the model
Use model
- The database connection is a single column under
fpm
, - All database operations are automatically switched to connection pool in
swoole
mode
Cache
HTTP/TCP/WEBSOCKET/UDP
Start a websocket server, Add http service monitoring, Add tcp service monitoring
RPC
Call the method of the remote server like the method of this project. Cross language, cross machine.
Service
Start the rpc service. The framework has built-in rpc services for each protocol, just add it to the action
in the above configuration file. For example: support http
call, and support tcp
call.
Add specific services to rpc,
For example, there is a class Abc
Add Abc
to rpc service
Client call
In order to facilitate the call, we create a mapping class (one framework can be automatically generated)
The remote method of calling the rpc service is the same as the method of calling this project. You can imagine this method is in your project.
The above is called through the http protocol. You can also call through other protocols. For example, Tcp protocol
The classes RpcClientHttp
and RpcClientTcp
are in the framework.
You can also copy it to any other place for use.
more
Document
TODO
- support Workerman
- orm support postgresql