PHPackages                             bigpoint/slim-bootstrap3 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. bigpoint/slim-bootstrap3

ActiveLibrary[HTTP &amp; Networking](/categories/http)

bigpoint/slim-bootstrap3
========================

These classes provide a simple way to bootstrap a slim v3 application with authentication.

3.0.2(2y ago)07.4k[1 issues](https://github.com/Bigpoint/slim-bootstrap3/issues)Apache-2.0PHPPHP &gt;=7.0CI failing

Since Jan 20Pushed 2y ago5 watchersCompare

[ Source](https://github.com/Bigpoint/slim-bootstrap3)[ Packagist](https://packagist.org/packages/bigpoint/slim-bootstrap3)[ Docs](https://github.com/bigpoint/slim-bootstrap3)[ RSS](/packages/bigpoint-slim-bootstrap3/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (8)Versions (13)Used By (0)

Slim Bootstrap v3
=================

[](#slim-bootstrap-v3)

These classes provide a simple way to bootstrap a slim v3 application with authentication.

It is an abstraction of the [Slim Framework](http://slimframework.com/) v3 and handles some stuff like output generation in different formats and authentication / acl handling.

Installation
------------

[](#installation)

slim-bootstrap3 is available via [packagist](https://packagist.org/packages/bigpoint/slim-bootstrap3):

```
composer require bigpoint/slim-bootstrap3

```

Webserver configuration
-----------------------

[](#webserver-configuration)

In order to configure your webserver to pass all requests in a proper way to the slim application please read the [Web Server](https://www.slimframework.com/docs/start/web-servers.html) section of the slim documentation.

How to implement manually
-------------------------

[](#how-to-implement-manually)

In order to create a REST API based on this framework you need a structure similar to the following in your project:

```
├── composer.json
├── config
│   └── application.json
├── include
│   └── DummyApi
│       └── Endpoint
│           └── V1
│               ├── EndpointA.php
│               └── EndpointB.php
└── www
    └── index.php

```

### config/application.json

[](#configapplicationjson)

This file holds the main configuration for the implementation of the framework as a JSON. This file doesn't have to be at this location, it is just the default location. If you change it you have to adapt the example of the `www/index.php` that is shown later.

The following keys are possible but all optional (shown here with the default values):

```
{
  "displayErrorDetails": false,
  "cacheDuration": 900
}
```

The `cacheDuration` defines the interval (in seconds) used for the cache expire headers of the response (default: 900).

If the `displayErrorDetails` flag is set to true the slim framework will print out a stack trace if an error occurs. Otherwise it will just show a "500 Internal Server Error" (default: false).

### the include/ folder

[](#the-include-folder)

This folder should contain your endpoint implementation. Read below about how to define an endpoint.

### www/index.php

[](#wwwindexphp)

This file is the main entry point for the application. Here is a minimum example how this file should look like:

```
