Create a REST API

Build a REST API that allows direct customer access to your full application functionality and which also drives all of your internal functionality implementation.

Minimal REST API Implementation Example: /api/v1/api.php

<?php
if (!isset($core)) {
    $core = new core();
    require_once dirname(__FILE__) . "/../../dscore/core.php";
} else {
    $core->restapi->internal_execution = true;
}
$core->restapi->allow_xml_response = true;
$core->restapi->base_file_path = dirname(__FILE__);

class api_customers extends restapi_implementation {
    function get($params) {
        $response = array('name' => 'cool');
        return $response;
    }
}

$core->restapi->classes = array(
                                'customers' => array('class' => 'api_customers'),
                                );
$core->restapi->execute();
?>