PHP Classes

PHP REST Server Class: REST Web service server that maps URL to API calls

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (2 months ago) RSS 2.0 feedStarStarStarStar 65%Total: 1,513 This week: 3All time: 2,593 This week: 42Up
Version License PHP version Categories
rest-server 1.0.12GNU General Publi...5.3PHP 5, Web services
Description 

Author

This package implements a REST Web service server that maps URL to API calls.

The main class can register one or more objects that will handle API calls. Handler objects must be of classes based on the REST object class.

The main class also dispatches API calls by extracting the handler object name, API call function name and any parameters from the URL.

The return values of the REST object handler functions are returned JSON encoded as responses to the REST requests.

Picture of Rafal Przetakowski
  Performance   Level  
Name: Rafal Przetakowski <contact>
Classes: 4 packages by
Country: Poland Poland
Age: 45
All time rank: 115528 in Poland Poland
Week rank: 51 Up3 in Poland Poland Up

Recommendations

PHP JSON RESTful Web service example
RESTful Web service that returns data in json

REST API Structure for Web and mobile API
I want a PHP REST API Structure for Web and mobile development

What is the best PHP api creation class?
i need to create api to be executed in multiple devices

Create Rest API using PDO
i want to create web API using PDO and json for mobile app

Details

It is a complete simple rest server. To use it, copy files into a document root directory.

Then you can use your browser:

http://yourserver.com/rest/User/example

or bash:

$ curl -u username:password -X POST http://yourserver.com/rest/User/login

URL parts: http://yourserver.com/rest/[REST OBJECT]/[REST OBJECT METHOD]/[PARAM]/[PARAM]/[PARAM]

File restObjects/rest_User.php is an example how to write your rest objects


  Files folder image Files  
File Role Description
Files folder imagerestObjects (1 file)
Accessible without login Plain text file .htaccess Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file rest.php Example Auxiliary script
Plain text file restObject.php Class Class source
Plain text file restServer.php Class Class source

  Files folder image Files  /  restObjects  
File Role Description
  Accessible without login Plain text file rest_User.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:1,513
This week:3
All time:2,593
This week:42Up
User Ratings User Comments (2)
 All time
Utility:84%StarStarStarStarStar
Consistency:81%StarStarStarStarStar
Documentation:71%StarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:65%StarStarStarStar
Rank:635
 
could use a bit more internal notation to explain more about ...
6 years ago (Larry Judd)
77%StarStarStarStar
Show de bola!
8 years ago (Wagner Gonçalves)
70%StarStarStarStar