Code Monkey home page Code Monkey logo

pvc's Introduction

PVC

Lean P[HP] [M]VC framework using well-tried concepts in PHP.

Travis Scrutinizer Packagist GitHub (pre-)release License PHP from Packagist

Features

Beside controllers, an event dispatcher and a PHP two step view including view helpers and extensions PVC supports the following standards:

  • PSR-7 HTTP message implementation
  • PSR-15 HTTP server-side middlewares
  • PSR-17 HTTP factories implementation

Others are planned.

Prerequisites

  • PHP 7.2
  • Composer
  • [Docker]

Installation

Composer

It is recommended to install PVC with Composer.

$ composer create-project tebe/pvc myproject

Running

You can run the included example website with PHP's built-in server or Docker.

PHP built-in server

Run the following command in terminal to start localhost web server:

$ cd myproject/example/public
$ php -S localhost:9999

Start your web browser and open http://localhost:9999

Stop the server by entering CTRL+C.

Docker

Start the example application stack using Docker Compose:

$ cd myproject
$ docker-compose up -d

Start your web browser and open http://localhost:9090

Stop the application stack:

$ cd myproject
$ docker-compose down

Middlewares

The example is using some middlewares.

For the BasicAuth middleware the Login details are:

Username: user
Password: pass 

You're ready to go!

Testing & Code quality

We've integrated several Composer scripts to ensure code quality.

# Using PHPUnit
$ composer phpunit

# Using PHP-Codesniffer
$ composer phpcs

# Fixing Codesniffer issues
$ composer phpcbf

# Using both together
$ composer test

Continuous Integration

PVC is using Travis for Continuous Integration.

License

MIT License

Issues

Any suggestions? Open an issue.

pvc's People

Contributors

tbreuss avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.