1. Go to this page and download the library: Download appserver-io/restapi library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
appserver-io / restapi example snippets
/**
* A SLSB implementation providing some API functionality.
*
* @EPB\Stateless
*
* @SWG\Info(
* title="My API",
* version="1.0.0"
* )
*
* @SWG\Swagger(
* schemes={"http"},
* host="127.0.0.1:9080",
* basePath="/my-api/api.do"
* )
*/
class SomeProcessor
{
/**
* Returns the DTO with the passed ID.
*
* @param integer $id The ID of the DTO to return
*
* @return \Ma\Api\Dtos\MyDto The DTO with the data
*
* @SWG\Get(
* path="/traveltaxpackages/{id}",
* operationId="find",
* produces={"application/json"},
* @SWG\Parameter(
* name="id",
* in="path",
* description="The ID of the DTO to return",
*
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.