\JCORE\TRANSPORT\RESTREST_API

Class REST_API

Summary

Methods
Properties
Constants
__construct()
request()
parseRequest()
compileResponse()
RETRIEVE()
UPDATE()
CREATE()
DELETE()
No public properties found
No constants found
No protected methods found
$requestHeaders
$raw_data
$crudType
$msgObj
N/A
No private methods found
No private properties found
N/A

Properties

$requestHeaders

$requestHeaders : 

the request headers

Type

$raw_data

$raw_data : 

the request raw_data

Type

$crudType

$crudType : 

the request raw_data

Type

$msgObj

$msgObj : 

the request raw_data

Type

Methods

__construct()

__construct() : \JCORE\TRANSPORT\REST\return

DESCRIPTOR: will parse the $_SERVER["REQUEST_METHOD"] and set the raw data from the request

Returns

\JCORE\TRANSPORT\REST\return —

bool NULL

request()

request() : \JCORE\TRANSPORT\REST\return

DESCRIPTOR: HTTP request types handled GET, POST, PUT, DELETE,

HTTP request extended types HEAD Asks for the response identical to the one that would correspond to a GET request, but without the response body TRACE, Echoes back the received request, OPTIONS, Returns the HTTP methods that the server supports for specified URL PATCH Is used to apply partial modifications to a resource CONNECT, get_headers()

Returns

\JCORE\TRANSPORT\REST\return —

mixed $raw_data

parseRequest()

parseRequest(  $raw_data) : \JCORE\TRANSPORT\REST\return

DESCRIPTOR: enforce a method to parse the request in the child

Parameters

$raw_data

Returns

\JCORE\TRANSPORT\REST\return —

NULL

compileResponse()

compileResponse(  $dataSet) : \JCORE\TRANSPORT\REST\return

DESCRIPTOR: enforce a method to compile a response (in the transport format) in the child

Parameters

$dataSet

Returns

\JCORE\TRANSPORT\REST\return —

NULL

RETRIEVE()

RETRIEVE(  $args) : \JCORE\TRANSPORT\REST\return

DESCRIPTOR: map HTTP GET to CRUD operation RETRIEVE enforce a method in the child to handle it

Parameters

$args

Returns

\JCORE\TRANSPORT\REST\return —

NULL

UPDATE()

UPDATE(  $args) : \JCORE\TRANSPORT\REST\return

DESCRIPTOR: UPDATE a resource map HTTP POST to CRUD operation UPDATE enforce a method in the child to handle it

Parameters

$args

Returns

\JCORE\TRANSPORT\REST\return —

NULL

CREATE()

CREATE(  $args) : \JCORE\TRANSPORT\REST\return

DESCRIPTOR: map HTTP PUT to CRUD operation CREATE enforce a method in the child to handle it

Parameters

$args

Returns

\JCORE\TRANSPORT\REST\return

DELETE()

DELETE(  $args) : \JCORE\TRANSPORT\REST\return

DESCRIPTOR: map HTTP DELETE to CRUD operation DELETE enforce a method in the child to handle it

DELETE

Parameters

$args

Returns

\JCORE\TRANSPORT\REST\return