Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API

Last update: Jun 28, 2022

Restler Luracast Restler

![Gitter](https://badges.gitter.im/Join Chat.svg) Latest Stable Version Total Downloads Latest Unstable Version License

Version 3.0 Release Candidate 5

Restler is a simple and effective multi-format Web API Server written in PHP.

Just deal with your business logic in php, restler will take care of the REST!

if you do not have PHP >= 5.3.2 on your server and wont be able to upgrade you may use Restler 2 instead

Restler 3 - Better APIs by Design

Features

  • No Learning Curve
  • Light weight
  • Flexible
  • Highly Customizable
  • Many Examples that can be tried on your localhost to get started
  • Supports HTTP request methods HEAD, GET, POST, PUT, DELETE, OPTIONS and PATCH via header or request parameter (method)
  • Supports both RESTful and Pragmatic REST API Design
  • Clients can use X-HTTP-Method-Override header, supports Cross Origin Resource Sharing and JSONP
  • Two way format(media type) conversion both send and receive
    • Pluggable content Formatter framework and api
    • Comes with JSON, XML, Yaml, Amf, and Plist(both XML and Binary) format support
  • Pluggable Authentication schemes
    • OAuth 2 Server
  • Pluggable Filters to effectively manage API usage
    • API Rate Limiting Filter
  • Routing
    • Manual Routing (Annotation)
      • Using @url GET my/custom/url/{param} PHPDoc comments
    • Auto Routing (Reflection)
      • URL to Method mapping
      • URL part to Method parameter mapping
      • Query parameters to Method parameter mapping
      • Request body to Method parameter mapping
      • [planned] Header to Method parameter mapping
  • Cache built-in
    • Client Side Caching support
    • Proxy Caching support
    • Server Side Caching
      • [planned] ETag, If-None-Match support
      • [planned] Last-Modified, If-Modified-Since support
  • API Features
    • Always supports URLEncoded format for simplified input (POST vars)
    • Automatic parameter validation and type conversion
    • API versioning support by URL and/or vendor specific MIME
    • API documentation and discovery using Restler API Explorer
    • Throttling and Performance tuning
  • Management

Git Repository and the Branches

  1. Most stable and recent version is maintained at the master branch, previous versions are kept in the branches such as v1 and v2

  2. Version branch with the current version such as v3 is used for building up the next release. It's documentation may not be updated frequently and thus reserved for the daring ones.

  3. Feature branches such as features/html and features/router are purely for experimentation purpose to try out a feature

Installation

Make sure PHP 5.3.2 or above (at least 5.3.4 recommended to avoid potential bugs) is available on your server

1. Install Composer

Restler uses Composer to manage its dependencies. First, download a copy of composer.phar. It can be kept in your project folder or ideally in usr/local/bin to use it globally for all your projects. If you are on Windows, you can use the composer windows installer instead.

2. Install Restler

Option 1. Using composer create-project

You may install Restler by running the create project command in your terminal. Replace {projectName} with your actual project name. It will create a folder with that name and install Restler.

php composer.phar create-project luracast/restler {projectName}

Note:-

  1. If you do not want the additional formats and BDD tools you can include --no-dev to enforce exclusion of dev packages.

  2. If you want to try the bleading edge v3 branch or any of the feature branches include 3.x-dev or dev-features/html in the above command

Option 2. Downloading from github

Once Composer is installed, download the latest version of the Restler framework and extract its contents into a directory on your server. Next, in the root of your Restler project, run the php composer.phar install (or composer install) command to install all of the framework's dependencies. This process requires Git to be installed on the server to successfully complete the installation.

If you want to update the Restler framework, you may issue the php composer.phar update command.

Note:- If are not allowed to install composer and git on your server, you can install and run them on your development machine. The resulting files and folders can be uploaded and used on the server.

3. Configure

Ideally public folder should be mapped as your web root, It is optional, but recommended to avoid exposing unneeded files and folders.

4. Try it out

Try the live examples in your localhost

5. Run some test

Update the base_url specified in behat.yml and then try the following command

bin/behat

This will test the examples against the behaviors expected, for example

Feature: Testing CRUD Example
    Scenario: Creating new Author with JSON
        Given that I want to make a new "Author"
        And his "name" is "Chris"
        And his "email" is "[email protected]"
        And the request is sent as JSON
        When I request "/examples/_007_crud/authors"
        Then the response status code should be 200
        And the response should be JSON
        And the response has a "id" property

All set, Happy Restling! :)

Quick Start Guide

Once you have got restler installed with the above steps, you can quickly create your application by following these steps

1. Write API

Create your API classes with all needed public and protected methods

2. Open the Gateway

Create the gateway (index.php) as follows

<?php
require_once '../../../vendor/restler.php';
use Luracast\Restler\Restler;

$r = new Restler();
$r->addAPIClass('YourApiClassNameHere'); // repeat for more
$r->handle(); //serve the response

3. Prettify URLs

Enable URL Rewriting

Make sure all the requests are routed to index.php by enabling URL Rewriting for your website

For example:-

If you are on Apache, you can use an .htaccess file such as

DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^$ index.php [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule mod_php5.c>
    php_flag display_errors On
</IfModule>

Note:- This requires AllowOverride to be set to All instead of None in the httpd.conf file, and might require some tweaking on some server configurations. Refer to mod_rewrite documentation for more info.

If you are on Nginx, you have to make sure you set the server_name and pass the PHP scripts to fast cgi (PHP-FPM) listening on 127.0.0.1:9000

server {
        listen        80;
        server_name   api.luracast.com; //change it to match your server name

        //... other stuff

        location ~ \.php$ {
            root           /var/www/html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /var/www/html/$fastcgi_script_name;
            include        fastcgi_params;
        }

        //... other stuff

}

Note:- This requires PHP, PHP-FPM to be properly installed and configured. Refer to PHP FastCGI example for more info.

4. Customise

Fine tune to suit your needs

<?php
require_once '../../../vendor/restler.php';
use Luracast\Restler\Restler;
use Luracast\Restler\Defaults;
//set the defaults to match your requirements
Defaults::$throttle = 20; //time in milliseconds for bandwidth throttling
//setup restler
$r = new Restler();
$r->addAPIClass('YourApiClassNameHere'); // repeat for more
$r->addAPIClass('Resources'); //from restler framework for API Explorer
$r->addFilterClass('RateLimit'); //Add Filters as needed
$r->handle(); //serve the response

If you have successfully completed Installation Step 2, you should have Restler API Explorer installed in vendor/Luracast/explorer folder. Create a symbolic link of vendor/Luracast/explorer/dist or copy the folder and name it as explorer

Place the explorer in the same folder as the index.php

Explore the api and try it out by openings explorer/index.html from the web root on your browser

Happy Exploring! :)

Note:- Using eAccelerator can make restler to fail as it removes the comments. More info can be found here

5. Annotate

Restler supports annotations in the form of PHPDoc comments for API fine tuning

They are documented in detail under Annotations

6. Authorize

In order to protect your api, authenticate and allow valid users

<?php
require_once '../../../vendor/restler.php';
use Luracast\Restler\Restler;
$r = new Restler();
$r->addAPIClass('YourApiClassNameHere'); // repeat for more
$r->addAuthenticationClass('CustomAuth'); //Add Authentication classes as needed
$r->handle(); //serve the response

7. Start Production

By default Restler runs in debug mode more fine tuned for API developer, by showing detailed error messages and prettifying the api result to human readbale form

By turning on production mode you will gain some performance boost as it will cache the routes (comment parsing happens only once instead of every api call), few other files and avoid giving out debug information

<?php
require_once '../../../vendor/restler.php';
use Luracast\Restler\Restler;

//setup restler

$r = new Restler(true); //turn on production mode by passing true.
//If you are using file based cache (the default) make sure cache folder is
//writable. when you make changes to your code make sure you delete the
// routes.php inside the cache folder
//...

Change Log

Restler 3.0 RC5

  • Scope (an dependency injection container) is added. It's register method allows adding api classes that has some dependencies.
  • Improves HtmlFormat to support blade templates and makes it easily extendable to add your own templates.
  • HtmlFormat::$format has been renamed as HtmlFormat::$template for better clarrity
  • HtmlFormat now supports auto templating to load relevant template for an API method based on the mapped url.
  • Tag, a utility class for generating html tags in object oriented way.
  • Emmet class that extends a subset of emmet to create a a template engine.
  • Forms class to auto generate forms for any API method prebuilt in HTML5, Twitter Bootstrap 3, Zurb Foundation formats.
  • Validator improved to allow suppressing validation errors from throwing exceptions immediatly, so that API call can reach the API method
  • Validator improved to be form validation friendly.
  • Nav class creating html navigation interface.
  • OAuth examles updgrated to use version 1.0 of OAuth2 library.
  • Many bug fixes and improvements.

Restler 3.0 RC4

  • $reques_data in api method parameters and getRequestData() on restler instance now excludes $_GET parameters.
  • Returning null from api method now excludes the response body. This behaviour can be changed by setting Defaults::$emptyBodyForNullResponse to false.
  • Added many api examples under tests folder for testing feature by feature using BDD
  • Support for custom class parameters and array of custom class parameters
  • Ability to pass the parameter directly as the body of the request when it is the only parameter
  • Fixes to composer.json and publish stable release as composer package on packagist.
  • New Routes class with improved routing, including wild card routes and smart routing based on paramter type.
  • Possibility to use any autoloader including composer's autoloader for maximum interoperability
  • Moved to using the rodneyrehm/plist package for CFPropertyList.
  • Removed required packages as they are not technically "required" per se, Restler works out of the box.
  • Created supported packages as require-dev instead which will be installed via composer install --dev
  • Added suggested section for all the supported packages.
  • Added keywords to package descriptor
  • Added branch alias to indicate that v3 is the snapshot for v3.0.x-dev
  • Released Restler as package on packagist.

Restler 3.0 RC3

  • Added Defaults::$cacheDirectory to set cache directory in one central place
  • Added JSONP support with JsFormat class by extending JsonFormat.
  • Fixes fatal error when the JSON sent in the request body is not an object or array
  • Improves inline comment parsing by array conversion when delimiter is found and tag is not @pattern
  • RateLimit class re-written to support all range of time units second|minute|hour|day|week|month to have fine grained control
  • Resources class improved to include description for body parameters
  • Fixes Resources not to include namespace when the return type is array of custom class
  • Fixed Resource not to include the API of another class when the current api name is a begins with part of the other API
  • Added two more ways to exclude API's from explorer/documentation
    • Resources::$excludedHttpMethods (array)
    • Resources::$excludedPaths (array)
  • Fixes unescaped unicode bug in PHP < 5.4
  • Fixes a bug with ValidationInfo parsing @choice inline comment
  • Added Charset support
  • Added Language (basic) support
  • Updated the BDD tests to include new features
  • Fixes a bug in Restler class which affects $_GET overriding Defaults
  • Fixes a bug in XmlFormat parsing XML content to array
  • Added support for JSONP via jsFormat extension of JsonFormat
  • Fixes a bug in unicode un-escaping for JsonFormat in PHP < 5.4
  • Fixes the order so that responseFormat->setCharset is called before encoding the response
  • Documentation improvements and minor bug fixes

Restler 3.0 RC2

  • Filter classes can use authentication status and respond differently for authenticated users by implementing iUseAuthentication interface
  • RateLimit class added to rate limit the api usage
  • Fixed a bug with setCompatibilityMode
  • Resources updated to use only paths for resource identification instead of class name
    • Enabled Access Control for Documentation
  • Fixed CommentParser to ignore repeated white space so that it parses comments correctly
  • Fixed comment parsing for @status and @expires tags
  • Added the following Examples
    • Documentation
    • Rate Limit
    • Access Control
  • CRUD example updated to include PATCH support

Restler 3.0

Restler 3.0 is completely rewritten from Restler 2.0 with best practices in mind for

  • PHP Coding
  • RESTfulness and/or Pragmatic REST
  • API Design

Restler 3.0

  • uses namespaces, Late Static Bindings, and Closures and thus it is PHP 5.3+ only (if you need PHP 5.0+ support use Restler 2)
  • provides backward compatibility for Restler 1 and 2. Use $r->setCompatibilityMode($version);
  • supports hybrid api which provides extended data to authenticated users Use @access hybrid PHPDoc comment
  • uses smart auto routing by default where API method parameters that have default values are no longer mapped to the URL, instead they are mapped to query strings to reduce ambiguity in the url.
  • supports suppress_response_codes as query string, when set to true; all http responses will be returned with HTTP OK with the errors in the body to accommodate mobile and less privileged clients.
  • has improved CommentParser which adds support for embedded data in multiple formats
    • inline doc comments {@name value}
    • query string params ``` param1=value&param2=value2```
    • json ``` {"param1": value, "param2": value2}``` which can be placed in multi-lines
  • has Defaults class with static properties that can be changed to suit the needs
  • iAuthenticate is now using __isAllowed method instead of __isAuthenticated so that same class can be used for Authentication or Filtering
  • iUseAuthentication interface added to help hybrid access api methods and filters to find out about user authentication status
  • iFilter interface updated to provide charset support
  • ...(more to follow)

Restler 2.0

Restler 2.0 is a major rewrite to use convention over configuration and it is optimized for performance. Here are some of the major changes and improvements

  • PHPDoc comments to map a method to URI are now optional.
  • All public methods that does not begin with an underscore are mapped automatically to the method name (gateway\classname\methodname\param1\...)
  • If we do not specify the second parameter for $restler->addAPIClass it will be mapped to the class name instead of mapping it to the root
  • Restler 2 is written for PHP 5.3 and above but it make use of compat.php and work on any version of PHP starting from PHP 5.0

GitHub

https://github.com/Luracast/Restler
Comments
  • 1. Restler 3.0 Feature Requests and Ideas

    Since you asked for idea's, let me start with some :-)

    1. Output structure: http://groups.google.com/group/api-craft/browse_thread/thread/9b046e863b5943df. Metadata is something that can be generated from the API it self. Links can be generated from the class the user builds.
    2. Correct header settings: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html. Think some things here can be found that are useful. Like: 14.7 Allow
    3. Pagination: limiting the returning result set. Can be build in the api class of the user self, but perhaps some core functionality can be build in the API core ?
    4. JsonP: JsonP as part of the package; JsonP becomes more and more important with cross-domain usages.
    5. Versioning Support: To have an inbuilt Restler way to manage your API versions (Request from @KitCarrau in issue #21)

    More will follow when they pop up in my mind :-)

    Reviewed by electrical at 2011-12-16 17:33
  • 2. There can be Only One Autoloader

    Custom Autoloader is disabled by default in Restler 3

    Restler 3 is disabling all autoloaders and is using its own loader. The function is even called: "thereCanBeOnlyOne"

    There is a need for a autoloader. We use our own autoloader with a multi environment logic. This cannot be handled by a default one.

    We understand the reason why the autoloader is disabled, to avoid conflicts. However, by disabling the autoloader, one of the main features of Restler is compromised: "highly flexible".

    Suggestion is to keep the current logic, and add an option to disable the feature. Another suggestion might be to white list autoloaders. But that might be too complicated.

    Reviewed by Teqa at 2012-09-27 14:33
  • 3. Authentication with ACL

    Hi,

    Like i said on Twitter i'm searching for a more extensive way of authentication. In this case i want the users to authenticate them selves so i know what rights that user has. each user can have different rights to different REST functions.

    I could do HTTP AUTH, and use that to build up the ACL and check that when a REST call is done ? Or is there a cleaner way ?

    Reviewed by electrical at 2011-09-28 16:54
  • 4. /restler/vendor/Luracast/Restler/EventEmitter.php on line 35

    I seem to be getting this with every hit. I'm testing with a simple class with phpdoc routing, but the hit does not seem to be registered in Restler.

        public function __call($eventName, $params)
        {
            if ([email protected]_array($this->listeners[$eventName]))
                $this->listeners[$eventName] = array();
            $this->listeners[$eventName][] = $params[0];
            return $this;
        }
    

    Undefined offset: 0 at /restler/vendor/Luracast/Restler/EventEmitter.php on line 35 Seems like I'm not filling the $params value; any idea's on this?

    Confusing is, I know the class is being required, but restler does not seem to handle the phpdoc routing at all. Any way to test it with manual routing? addAPIClass(<class>,"") does not seem to change anything either..

    The following routing phpdoc I'm using:

    class SSLProduct extends BaseProduct {
        protected static function _db_product_columns() {
            return array();
        }
        /**
        *   @url GET product/ssl/{sslid}/info
        *   @url GET product/{sslid}
        *   @url GET product
        */
        public function get( $sslid ) {
            _debug( "loading " . __FUNCTION__."(".$sslid.")" );
            return SSLProduct::find_one_by_id( $sslid );
        }
    }
    
    Reviewed by luceos at 2013-02-11 10:25
  • 5. Error: 404 not found in restler php while checking in localhost

    Restler php thrown error 404 (not found). I am checking the example code in my localhost. I don’t understand where’s the issue. My error is

    { "error": { "code": 404, "message": "Not Found" }, "debug": { "source": "Routes.php:389 at route stage", "stages": { "success": [ "get" ], "failure": [ "route", "negotiate", "message" ] } } }

    Please help me. I’m new in restler. Thank you

    Reviewed by pratushraj at 2021-06-18 06:25
  • 6. Problem with swedish characters (utf8?)

    I have problem to return swedish characters. i think its a utf8 problem. When i return some data from my database its just return null if it contains any "special character".

    When i pass data to the server and return it then i get outputs like this "test\u00e5\u00e4\u00f6test"

    Reviewed by rendom at 2012-03-06 11:23
  • 7. mod_rewriting not working

    Hi,

    I'am running Restler on a machine with Centos 5.1 + Apache/2.2.20 (EL) + php 5.2.17. It's working when I passed index.php in the url but it only display a blank page if I removed it?

    I've have test the apache's mod_rewrite module with a simple test (redirecting to yahoo) and it's working.

    Do you have clues where I can look to validate the rewrite rule and understand why is returning a blank page?

    thank you in advance!

    MartinO

    Reviewed by geomartino at 2011-09-20 20:27
  • 8. Hide documentation of one parameter in swagger-ui

    Hi, Is there a way to designate a parameter of function that should not be documented, so that the parameter will not be visible in swagger-ui ?

    Thank you!

    Reviewed by gnouet at 2015-03-03 16:30
  • 9. RC6 fatal error

    I downloaded RC6 and swapped out my existing vendor directory with the one from RC6, and now I'm getting this in my error log.

    PHP Notice: Array to string conversion in .../vendor/Luracast/Restler/AutoLoader.php on line 266, referer: https://.../explorer/index.html PHP Catchable fatal error: Object of class Closure could not be converted to string in .../vendor/Luracast/Restler/AutoLoader.php on line 266, referer: https://.../explorer/index.html

    I tried this with php 5.4.24 and php 5.5.15

    Reviewed by grosch at 2014-08-08 06:26
  • 10. Restler API Explorer POSTing JSON data

    Hi,

    I use Restler 3 RC4, and I have this bug : http://stackoverflow.com/questions/15383417/restler-api-explorer-posting-json-data

    I don't know what to do.

    Reviewed by nicosomb at 2013-09-18 19:01
  • 11. Explorer/Swagger issue & general customization questions

    Hi all,

    I'm once again diving into some of the swagger features in Restler and have some issues... Is there some documentation or more full featured example about customizing the explorer features now that its builtin to restler?

    I'm also having a weird behavior where as soon as explorer loads up all I get is this:

    image

    swagger.json has loaded, and seems like valid json in the inspector...

    image and I'm getting this which im not sure is related in the console...

    image

    Any idea about this or how to try to debug would be very helpful... googling hasnt really got me anywhere as of yet...

    UPDATE: It seems despite being valid JSON, its an error in the swagger json causing a problem... I'm at a loss abt how to track it down though since there are so many methods :/

    SyntaxError: Error resolving $ref pointer "/API/Explorer/swagger.json#/definitions/string". Token "string" does not exist. at Function.syntax (https://rebilly.github.io/ReDoc/redoc-demo.bundle.js:67:1507) at c.resolve (https://rebilly.github.io/ReDoc/redoc-demo.bundle.js:33:131266) at o.resolve (https://rebilly.github.io/ReDoc/redoc-demo.bundle.js:33:132605) at s._resolve (https://rebilly.github.io/ReDoc/redoc-demo.bundle.js:33:134856) at l (https://rebilly.github.io/ReDoc/redoc-demo.bundle.js:33:120926) at https://rebilly.github.io/ReDoc/redoc-demo.bundle.js:33:120809 at Array.forEach () at a (https://rebilly.github.io/ReDoc/redoc-demo.bundle.js:33:120731) at https://rebilly.github.io/ReDoc/redoc-demo.bundle.js:33:120828 at Array.forEach ()


    Another issue which I'm foreseeing, is that I have implemented a customized secuirty layer that implements different user levels and permissions. This all goes through an iAuthenticate class and validates different functions and classes through doccomments and user credentials as well as layers of security as well as what api calls are public, are internal, are available to apps or to end users, etc, and accorfding to permission levels, but this is all implementerd through __verifyAccess and __isAllowed functions, so in the end Restler is the one allowing or denying access... nonetheless despite having set Explorer to hide protected I see all endpoints in swagger.json... Is there somewhere I can look to understand better how it validates what classes are private/public etc? I guess I need to implement similar logic in case its not using the methods I stated above.

    Reviewed by roynasser at 2018-10-10 17:04
  • 12. How custom exception for FHIR

    Regards!. In the FHIR is a standard the output is represented by "OperationOutcome's" and the errors, the same eg:.

    {
    	"resourceType": "OperationOutcome",
    	"meta": {
    		"profile": ["https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1"]
    	},
    	"issue": [{
    		"severity": "error",
    		"code": "not-found",
    		"details": {
    			"coding": [{
    				"system": "https://fhir.nhs.uk/STU3/ValueSet/Spine-ErrorOrWarningCode-1",
    				"code": "PATIENT_NOT_FOUND",
    				"display": "Patient not found"
    			}]
    		}
    	}]
    }
    
    <?xml version="1.0" encoding="UTF-8"?><OperationOutcome xmlns="http://hl7.org/fhir">
      <id value="searchfail"/>
      <text>
        <status value="generated"/>
        <div xmlns="http://www.w3.org/1999/xhtml">
          <p>The &quot;name&quot; parameter has the modifier &quot;exact&quot; which is not supported by this server</p>
        </div>
      </text>
      <issue>
        <severity value="fatal"/>
        <code value="code-invalid"/>
        <details>
          <text value="The &quot;name&quot; parameter has the modifier &quot;exact&quot; which is not supported by this server"/>    
        </details> 
        <location value="http.name:exact"/>    
      </issue>
    </OperationOutcome>
    

    I'm thinking extends RestExeption... How custom the actual output exception?

    {
      "error": {
        "code": 400,
        "message": "Bad Request: `login` is required."
      }
    }
    
    Reviewed by ander-chan at 2022-04-28 21:17
  • 13. Explorer does not show data

    I have installed the Luracast and configured the explorer, but it does not show any data.

    image
    <?php
    //headers
    header('Access-Control-Allow-Origin: *');
    header('Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, PATCH, DELETE');
    //require_once __DIR__.'/../vendor/autoload.php';
    require_once '{My_restler_path}/api/vendor/autoload.php';
    require_once '{My_restler_path}/api/restler.php';
     // [...]
    require_once 'Authors.php';
     // [...]
    use Luracast\Restler\Restler;
    use Luracast\Restler\Defaults;
    //set the defaults to match your requirements
    Defaults::$throttle = 20; //time in milliseconds for bandwidth throttling
    //setup restler
    $r = new Restler();
    //$r->addAPIClass('Authors');
     // [...]
    $r->addAPIClass('Resources');
    $r->addAPIClass('Explorer'); //from restler framework for API Explorer
    $r->addFilterClass('RateLimit'); //Add Filters as needed
    $r->handle(); //serve the response
    

    On the other side, how can I configure the logs?

    Reviewed by erwinpalma at 2022-04-17 18:01
  • 14. List of API exposed

    Restler v3.0.0

    in the documentation we can find screenshot like this image

    seems like there's a command to print out in the console the list of exposed API... What's this command?

    Reviewed by mfonsatti at 2022-02-28 12:02
  • 15. Swagger issue locally

    Restler V3.0.0

    I inherited a legacy project based on Restler V3.0.0 I start the project with the command php -S localhost:<PORT> -t public ...

    but If I go to localhost:<PORT>/docs the Swagger interface has problems because of not loaded resources image

    How can I solve this?

    Reviewed by mfonsatti at 2022-02-28 11:56
  • 16. 404 : Not Found ../resources.json

    I found restler, and I use it in IIS server, but it gives error: 404 : Not Found ../resources.json I usually use WAMP environment what should I do Looking forward to your reply

    Reviewed by zhangjianshu666 at 2022-02-22 09:11
Generates documentation for your REST API from annotations

NelmioApiDocBundle The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs. Migrate from 3.x to 4.0 To migrate from

Jun 24, 2022
PHP 7.1 ready Smart and Simple Documentation for your PHP project
PHP 7.1 ready Smart and Simple Documentation for your PHP project

Smart and Readable Documentation for your PHP project ApiGen is the simplest, the easiest to use and the most modern api doc generator. It is all PHP

Jun 6, 2022
PHP 7.1 ready Smart and Simple Documentation for your PHP project
PHP 7.1 ready Smart and Simple Documentation for your PHP project

Smart and Readable Documentation for your PHP project ApiGen is the simplest, the easiest to use and the most modern api doc generator. It is all PHP

Apr 20, 2021
phpDocumentor is an application that is capable of analyzing your PHP source code and DocBlock comments to generate a complete set of API Documentation

phpDocumentor What is phpDocumentor? phpDocumentor is an application that is capable of analyzing your PHP source code and DocBlock comments to genera

Jul 3, 2022
Learn how to implement the most important Design Patterns into your PHP application, uses PHP 8.1
Learn how to implement the most important Design Patterns into your PHP application, uses PHP 8.1

Learn how to implement the most important Design Patterns into your PHP application. This project uses PHP 8.1. it has examples for each Pattern and an Article explaining how to use them step by step, their advantages, and disadvantages.

Jun 24, 2022
30 seconds of code Short PHP code snippets for all your development needs
30 seconds of code Short PHP code snippets for all your development needs

30 seconds of code Short PHP code snippets for all your development needs Visit our website to view our snippet collection. Use the Search page to fin

Jun 19, 2022
Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.

Daux.io - Deprecation Notice This repository is deprecated! Daux.io has been moved to an organization, to guarantee future development and support. So

Jun 22, 2022
Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.

Daux.io Daux.io is a documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It help

Jun 29, 2022
Simple forum software for building great communities.
Simple forum software for building great communities.

About Flarum Flarum is a delightfully simple discussion platform for your website. It's fast and easy to use, with all the features you need to run a

Jun 27, 2022
FluxBB is a fast, light, user-friendly forum application for your website.

FluxBB 1.5 Readme About FluxBB is an open source forum application released under the GNU General Public Licence. It is free to download and use and w

Jun 27, 2022
Ladumor Laravel Swagger help to setup swagger in your application easily
Ladumor Laravel Swagger  help to setup swagger in your application easily

Laravel Swagger Installation Install the package by the following command, composer require ladumor/laravel-swagger Add Provider Add the provider to

Jun 17, 2022
A php API documentation generator, fork of Sami

Doctum, a PHP API documentation generator. Fork of Sami Curious about what Doctum generates? Have a look at the MariaDB MySQL Kbs or Laravel documenta

Jun 24, 2022
A PHP framework foucs on API fast development.接口,从简单开始!PhalApi简称π框架,一个轻量级PHP开源接口框架,专注于接口服务开发。
A PHP framework foucs on API fast development.接口,从简单开始!PhalApi简称π框架,一个轻量级PHP开源接口框架,专注于接口服务开发。

PhalApi开源接口框架 / PhalApi API Framework 读音:派框架 Stargazers over time 开发文档 / Documents 专为PHPer准备的优雅而详细的开发文档,请看:PhalApi 2.x 开发文档。 PhalApi 2.x English Docs.

Jun 28, 2022
An API documentation generator

Sami: an API documentation generator WARNING: Sami is not supported nor maintained anymore. Feel free to fork. Curious about what Sami generates? Have

Jun 20, 2022
Yii2 Annotations Generate API Document Extension
 Yii2 Annotations Generate API Document Extension

Generate online api document by code annotation for yii2 easily

Dec 15, 2021
Sami: an API documentation generator

Sami: an API documentation generator WARNING: Sami is not supported nor maintained anymore. Feel free to fork. Curious about what Sami generates? Have

Jun 20, 2022
PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report.
PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report.

PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report.

Jun 30, 2022
Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT)

phpDox phpDox is a documentation generator for PHP projects. This includes, but is not limited to, API documentation. The main focus is on enriching t

Jun 20, 2022
Documentation Generator for PHP

phpDocumentor What is phpDocumentor? phpDocumentor is an application that is capable of analyzing your PHP source code and DocBlock comments to genera

Jun 28, 2022