Download the PHP package bankiru/rpc-server-bundle without Composer

On this page you can find all versions of the php package bankiru/rpc-server-bundle. 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 rpc-server-bundle

Latest Stable Version Total Downloads Latest Unstable Version License

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight

HTTP RPC Server bundle

This bundle provides default controller realisation to handle RPC requests which come to the application via HTTP requests

Implementations

RPC server does not declares any implementation requirements. Some could be

or other custom RPC which operates with method+parameters and utilizes single endpoint for several methods

HTTP Endpoints

Endpoint is a HTTP route which process basic HTTP request, providing initial parsing and processing request data

To enable HTTP endpoint you should enable custom endpoint router loader via the following router configuration:

Resource value is not important, it is ignored when loading routes as the endpoints are configured vua config

Configuration

Basic endpoint configuration looks like

This creates endpoint on URL / with generic symfony controller. Also it pre-populates the methods from the service_rpc.yml config file

my-public-endpoint will become a route name, so make sure it does not overlap with other routes until you want it do to this.

Method routing

Each RPC request has method and parameters. You can configure the application to handle different methods within different endpoints with different actions

Generic configuration looks like

Different resource types are supported. Built-in are

Annotation

Yaml

Different endpoint implementation may utilize different controller name parsers, so MyBundle:Test:entity notation is endpoint-dependent. I.e JSON-RPC may search TestController controller in MyBundle\JsonRpc\TestController

Resource

You can pass directory, class, file, yaml config as method source with prefix and context inheritance

The following chaing will result in prefix/annotation/sub method handled by AnnotationController::subAction with private+default context

Events

This bundle repeats the generic symfony request processing flow. You can hook your extension into given system events

RPC Controller implementation

The goal of implementing controller is to extend abstract RpcController passing RequestInterface and endpoint name into getResponse method.

RequestInterface is an extension of RpcRequestInterface with extra attributes allowing request metadata carrying alongside the request.

The generic solution is to convert incoming symfony Request instance into your own implementation of RequestInterface (i.e extract method and args from XML-RPC or JSON-RPC requests) and send serialized response back, transforming RpcResponseInterface back to your response object.

You can also automatically convert RpcResponseInterface into your serialized response via generic symfony view event processing


All versions of rpc-server-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ~5.5 || ~7.0
symfony/console Version ~2.7 || ~3.0
symfony/config Version ~2.7 || ~3.0
symfony/http-kernel Version ~2.7 || ~3.0
symfony/yaml Version ~2.7 || ~3.0
symfony/dependency-injection Version ~2.7 || ~3.0
doctrine/annotations Version ~1.2
scaytrase/rpc-common Version ~1.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 bankiru/rpc-server-bundle contains the following files

Loading the files please wait ....