PHP Classes

PHP JSON RPC Objective Server: Handle API requests to a JSON RPC server

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 234 All time: 8,109 This week: 524Up
Version License PHP version Categories
intortus-json-rpc 1.2.1GNU General Publi...5.3PHP 5, Libraries, Web services
Description 

Author

This package can handle API requests to a JSON RPC server.

It can register named request handler objects that will handle JSON RPC requests with those names.

The main class parses the request parameters from the HTTP POST body data and dispatches the request to the registered request handler objects.

The class takes the handler object response and creates a JSON encoded response to be returned by the JSON RPC server.

Picture of Martin Barker
  Performance   Level  
Name: Martin Barker <contact>
Classes: 14 packages by
Country: United Kingdom
Age: 35
All time rank: 29414 in United Kingdom
Week rank: 164 Up6 in United Kingdom Up
Innovation award
Innovation award
Nominee: 2x

Example

<?php
include "intortus/autoload.php";
include
"API/example.php";

$test = new \intortus\jsonrpc\Handler();
$test->createObject("example", API\example::getInstance());
$test->begin();
?>


Details

Version ------------------------------------------------------------------------------- Version 1.2 Moved Singleton Architecture for Objects into the Callable Object class. Version 1.1.3 Fixed another by causing MethodNotFound incorrectly. Version 1.1.2 Fixed a bug in the method registration system that prevented. methods from working. Version 1.1 Added example of objective design pattern. Version 1.0 JSON RPC Server supporting Objective Design Pattern. Usage ------------------------------------------------------------------------------- please see /index.php for example how to use Autoloader ------------------------------------------------------------------------------- This Libary provides an autoloader that has to be used to load these classes. DO NOT TRY AND INCLUDE ANYTHING FROM INSIDE THE JSONRPC FOLDER. the auto loader will do this for you. Code outline ------------------------------------------------------------------------------- There is a uncompleted version of phpDocumentation for this procat at: https://mega.nz/#!SEMSWSgQ!rCwYyhVuXmDnMtEfJ8O1e9LGrNrDDuDpjeaDhSzWVCk this only provides outlines for the handler.php as that is the only file you would normally be interacting with.

  Files folder image Files (11)  
File Role Description
Files folder imageAPI (1 file)
Files folder imageintortus (1 file, 1 directory)
Accessible without login Plain text file index.php Example Example Server entry point file
Accessible without login Plain text file ReadMe.txt Doc. Readme
Accessible without login Plain text file test.php Example example script showing how to test the serevr

  Files folder image Files (11)  /  API  
File Role Description
  Plain text file example.php Class Example use of objective design for use in index.php

  Files folder image Files (11)  /  intortus  
File Role Description
Files folder imagejsonrpc (6 files)
  Accessible without login Plain text file autoload.php Aux. Autoloader for intortus Library

  Files folder image Files (11)  /  intortus  /  jsonrpc  
File Role Description
  Plain text file callableobject.php Class base object for all classes that are provided to the server
  Plain text file error.php Class error object that get's provided as a response to an error'd request
  Plain text file handler.php Class Main Source: the JSON RPC Server
  Plain text file request.php Class request object file used to convert json request into Objects in PHP
  Plain text file response.php Class response object file used to convert response to JSON code
  Plain text file returnableobject.php Class base object for any object that returns though the JSON RPC server

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:234
This week:0
All time:8,109
This week:524Up