PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   PHP RESTful API Example   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP RESTful API Example
Example implementation of a REST API
Author: By
Last change:
Date: 7 months ago
Size: 338 bytes
 

Contents

Class file image Download
<?php
namespace PH7\ApiSimpleMenu;

use
Whoops\Run as WhoopsRun;
use
Whoops\Handler\JsonResponseHandler as WhoopsJsonResponseHandler;

require
__DIR__ . '/vendor/autoload.php';

// handle all exceptions and convert them into JSON format
$whoops = new WhoopsRun();
$whoops->pushHandler(new WhoopsJsonResponseHandler);
$whoops->register();