2017 © Pedro Peláez
 

library jsonrpcsmd

Classes to build a map of the services available using the JSON-RPC SMD specification (http://www.simple-is-better.org/json-rpc/jsonrpc20-smd.html).

image

greplab/jsonrpcsmd

Classes to build a map of the services available using the JSON-RPC SMD specification (http://www.simple-is-better.org/json-rpc/jsonrpc20-smd.html).

  • Tuesday, January 20, 2015
  • by dzegarra
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

JSON-RPC Service Mapping Description builder

This library make a reflection of the classes given and output a json using the v2 of the proposal specification published in simple-is-better.org., (*1)

Usage

To start use this library just create an instance of the Smb class. This class is the core of the library. You only need work this Smb. The Smb class only need to know the url of the endpoint witch is where the calls will be sended. You can pass the url in the constructor or set later using the setTarget() method. But remember, you cannot generate the json map if the target is not setted., (*2)

//You can start like this:
$smd = new \Greplab\Jsonrpcsmd\Smd('http://my-website/path/of/the/endpoint');

//Or like that:
$smd = new \Greplab\Jsonrpcsmd\Smd();
$smd->setTarget('http://my-website/path/of/the/endpoint');

Canonical URL

If the "canonical" option is enabled each method will have a diferent endpoint consisting in the default endpoint url plus the name of the service and method. This is useful when you use a tool like firebug to monitor the ajax calls. This way each call is easily recognizable but require the server recognize and identify this last seccion as the service and method path. This option is disabled by default., (*3)

To change this use: $smd->setUseCanonical(true);, (*4)

Add classes

To index a class simple execute:, (*5)

$smd->addClass('ClassNameToIndex');

You have to call this method for each class you want to index., (*6)

Build the json map

To get the json map just print the Smd instance to the browser. If you want the json before to send the browser use the toJson() method., (*7)

$json = $smd->toJson();
print($json);

License

This library is open-sourced software licensed under the MIT license, (*8)

The Versions

20/01 2015

dev-master

9999999-dev https://github.com/GrepLab/jsonrpcsmd

Classes to build a map of the services available using the JSON-RPC SMD specification (http://www.simple-is-better.org/json-rpc/jsonrpc20-smd.html).

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

service json json-rpc jsonrpc mapping rpc description smd

20/01 2015

v0.2.1

0.2.1.0 https://github.com/GrepLab/jsonrpcsmd

Classes to build a map of the services available using the JSON-RPC SMD specification (http://www.simple-is-better.org/json-rpc/jsonrpc20-smd.html).

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

service json json-rpc jsonrpc mapping rpc description smd

17/01 2015

v0.2

0.2.0.0 https://github.com/GrepLab/jsonrpcsmd

Classes to build a map of the services available using the JSON-RPC SMD specification (http://www.simple-is-better.org/json-rpc/jsonrpc20-smd.html).

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

service json json-rpc jsonrpc mapping rpc description smd

02/11 2014

v0.1.2

0.1.2.0 https://github.com/dzegarra/jsonrpcsmd

Classes to build a map of the services available using the JSON-RPC SMD specification (http://www.simple-is-better.org/json-rpc/jsonrpc20-smd.html).

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

service json json-rpc jsonrpc mapping rpc description smd

20/10 2014

0.1.1

0.1.1.0 https://github.com/dzegarra/jsonrpcsmd

Classes to build a map of the services available using the JSON-RPC SMD specification (http://www.simple-is-better.org/json-rpc/jsonrpc20-smd.html).

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

service json json-rpc jsonrpc mapping rpc description smd

20/10 2014

v0.1.0

0.1.0.0

Classes to build a map of the services available using the JSON-RPC SMD specification (http://www.simple-is-better.org/json-rpc/jsonrpc20-smd.html).

  Sources   Download

The Requires

  • php >=5.0.0