Download the PHP package hyperf/jet without Composer

On this page you can find all versions of the php package hyperf/jet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jet

English | 中文

Hyperf Logo

Stable Version PHPUnit for Jet Total Downloads Monthly Downloads Php Version Hyperf Jet License

Jet, by Hyperf

Jet is a unification model RPC Client, built-in JSONRPC protocol, available to running in ALL PHP environments, including PHP-FPM and Swoole/Hyperf environments.

Also will built-in gRPC and Tars protocols in future.

Installation

Quickstart

Register protocol

Register the protocol is not necessary, but you could manage the protocols more easily by using ProtocolManager.

You cloud register any protocol by Hyperf\Jet\ProtocolManager, per protocol basically including Transporter, Packer, DataFormatter and PathGenerator, you could register a JSONRPC protocol like below:

If you use consul, you could register a JSONRPC protocol like below:

Register service

Register the service is not necessary, but you could manage the services more easily by using ServiceManager.

After you registered a protocol to Hyperf\Jet\ProtocolManager, you could bind the protocol with any services by Hyperf\Jet\ServiceManager, like below:

Call RPC method

Call by ClientFactory

After you registered the protocol and service, you could get your service client via Hyperf/Jet/ClientFactory, like below:

When you have the client object, you could call any remote methods via the object, like below:

If you call a not exist remote method, the client will throw an Hyperf\Jet\Exception\ServerException exception.

Call by custom client

You could also create a custom client class which extends Hyperf\Jet\AbstractClient, to call the remote methods via the client object.
For example, you want to define a RPC client for CalculatorService with jsonrpc protocol, you could create a CalculatorService class firstly, like below:

If use Consul service, you can use it in the following way.

Now, you could use this class to call the remote method directly, like below:


All versions of jet with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
hyperf/rpc Version ^3.0.19
hyperf/stringable Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hyperf/jet contains the following files

Loading the files please wait ....