2017 © Pedro Peláez
 

application slim-skeleton

Slim 3 framework skeleton - skeleton for a web service or an application

image

ansas/slim-skeleton

Slim 3 framework skeleton - skeleton for a web service or an application

  • Friday, January 5, 2018
  • by dhm80
  • Repository
  • 2 Watchers
  • 1 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 6 % Grown

The README.md

Slim 3 framework skeleton

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Skeleton for a web service or an application (based on Slim 3 framework)., (*2)

This skeleton follows several PHP Standards Recommendations (PSR): - [x] PSR-1 / PSR-2 (Coding standards) - [x] PSR-3 (Logging) via Monolog - [x] PSR-4 (Autoloading) via Composer - [x] PSR-7 (HTTP message) via Slim, (*3)

Included components

  • Slim 3.x incl. Flash messages & Twig view (MIT License)
  • Twig template engine 1.x (BSD License)
  • Monolog logger 1.x (MIT License)
  • Custom Error and NotFound handler
  • Middlewares: Cors, ForceRoute, Runtime, NoTrailingSlash, etc.
  • Provider: ConsoleLoggerProvider, ExtendedRequestProvider, PdoProvider, ProfilerProvider, etc.
  • Tests: PHPUnit bootstrap and AppTestCase prepared

Directory structure

path/to/project
|-- app                 <- Application config files
|   |-- slim            <- Slim config files
|   `-- twig            <- Twig templates
|-- bin                 <- Own scripts
|-- etc                 <- Own config files (like Apache)
|-- lib                 <- Vendor files (for composer)
|-- log                 <- Log files
|-- pub                 <- Webserver document root
|   |-- css
|   |-- img
|   |-- js
|   `-- lib
|-- src                 <- Application classes
|   `-- App
|       |-- Controller
|       |-- Handler     <- Put custom handlers here
|       |-- Middleware  <- Put custom middlewares here
|       |-- Model
|       |-- Provider    <- Put custom providers here
|       `-- Tests       <- Put custom tests (unit and integration tests) here
`-- tmp                 <- Temporary files
|   |-- session
|   `-- twig
`-- var                 <- Put other data in here

Requirements

Usage

Install / Create project

$ composer create-project ansas/slim-skeleton path/to/project

Develop / Run PHP build-in server

$ cd path/to/project
$ composer server

Open web browser with address http://any-domain-pointing-to-server:8888, (*4)

Call controller from console

$ cd path/to/project
$ composer run The\Controller\YouWantToRun <- calls __invoke()
$ composer run The\Controller\YouWantToRun:methodWanted
$ composer run The\Controller\YouWantToRun:methodWanted parem1=yes param2=hi

Test / Check coding style and test code

$ cd path/to/project
$ composer test

Contribute

Everybody can contribute to this package. Just:, (*5)

  1. fork it,
  2. make your changes and
  3. send a pull request.

Please make sure to follow PSR-1 and PSR-2 coding conventions., (*6)

License

__MIT license__ (see the LICENSE file for more information)., (*7)

The Versions

05/01 2018

dev-master

9999999-dev

Slim 3 framework skeleton - skeleton for a web service or an application

  Sources   Download

MIT

The Requires

 

05/01 2018

1.0.1

1.0.1.0

Slim 3 framework skeleton - skeleton for a web service or an application

  Sources   Download

MIT

The Requires

 

17/07 2017

1.0.0

1.0.0.0

Slim 3 framework skeleton - skeleton for a web service or an application

  Sources   Download

MIT

The Requires

 

02/02 2017

0.9.9

0.9.9.0

Slim 3 framework skeleton - skeleton for a web service or an application

  Sources   Download

MIT

The Requires

 

05/01 2017
17/12 2016
17/12 2016
10/10 2016
02/09 2016
05/08 2016

0.9.0

0.9.0.0

Slim 3 framework skeleton (for a web service or application)

  Sources   Download

MIT

The Requires