telabotanica / tb-base-rest-service
A simple PHP class that helps building REST webservices
Installs: 136
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 3
Open Issues: 0
pkg:composer/telabotanica/tb-base-rest-service
Requires
- php: >=5.5.0
This package is auto-updated.
Last update: 2025-10-08 04:29:31 UTC
README
A simple PHP class that helps building REST webservices
install
composer install telabotanica/tb-base-rest-service
usage
class MyService extends BaseRestServiceTB { public function __construct() { $config = array( "domain_root" => "http://sub.mydomain.tld", "base_uri" => "/my-service-root-folder", "first_resource_separator" => "/" ); parent::__construct($config); } protected function get() { // ... } protected function post() { // ... } }
config parameters
mandatory
- domain_root : root URL of your server
- base_uri : base path of your webservice
non-mandatory
- first_resource_separator : first character following your base_uri (typically "/" or ":", defaults to "/")