Download the PHP package jameswatts/cake-jsonrpc without Composer

On this page you can find all versions of the php package jameswatts/cake-jsonrpc. 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 cake-jsonrpc

JSON-RPC Plugin

The Jsonrpc plugin for CakePHP provides server and client implementations of JSON-RPC.

Requirements

Installation

To use the plugin simply include it in your application's "app/Plugin" directory, and load it in the "app/Config/bootstrap.php" file.

The above code is not required if you're already using to load all plugins.

Implementation

Server

The Jsonrpc.Server component allows a CakePHP application to listen for incoming JSON-RPC calls. The actions listening are defined in the "listen" option of the component's settings. To add the component to your controller acting as the end-point include it in your $components property, for example:

Once available, the server will now listen on the actions specified in the "listen" setting. When a call is made to one of these actions, and assuming no error occurs previously in the processing of the request, the call will be delegated to the controller method defined in the "method" property of the JSON request object. This method will receive a single argument, which is the JSON request object received by the server. The value returned by this method will be JSON encoded, and sent back to the client in the "result" property of the JSON response object.

In order to send an error as the response you need only throw an Exception in your controller's method. This will be caught by the Server component and processed as a JSON error object.

Client

The Jsonrpc.Client component allows a CakePHP application to make JSON-RPC requests to a server. To use the component add it to the $components property of your controller, for example:

From your actions you can now make requests using the Client component. To do so, first create a JSON request object, and then send it to the JSON-RPC server.

Keep in mind that if a JSON error object is returned from the server this will be thrown as a CakeException in your application.

You can also send batch requests to a server by specifying multiple JSON request objects in an array, for example:

When sending batch requests, if one of the request returns a JSON error object a CakeException will not be thrown, as the error object is returned within the array. Also, be aware that the order of the JSON response objects may not be coherent with the order of the requests sent, so always use the ID to determine the response corresponding with your request.

Documentation

For a full reference on the internals of the JSON-RPC protocol/transport see the specification.

Support

For support, bugs and feature requests, please use the issues section of this repository.

Contributing

If you'd like to contribute new features, enhancements or bug fixes to the code base just follow these steps:

There may be some discussion reagrding your contribution to the repository before any code is merged in, so be prepared to provide feedback on your contribution if required.

A list of contributors to the Jsonrpc plugin can be found here.

Licence

Copyright 2013 James Watts (CakeDC). All rights reserved.

Licensed under the MIT License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.

Acknowledgements

Thanks to Larry Masters and everyone who has contributed to CakePHP, helping make this framework what it is today. Also, to the JSON-RPC Working Group, for their hard work and dedication to the specification.


All versions of cake-jsonrpc with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
composer/installers Version *
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 jameswatts/cake-jsonrpc contains the following files

Loading the files please wait ....