nphp


Requirements

Only requirement for nphp is PHP 5.3 or newer. Mod_rewrite is suggesed for deployment with Apache, although it runs on every HTTP server that supports PHP.

Installing from ZIP

  • download latest version
  • unpack the archive
  • move files to your project

Installing from development version

Project code is hosted on GitHub, use git clone git://github.com/akristof/nphp.git to clone repository.

Installing with Composer

  • install Composer (Windows, *nix)
  • create composer.json file in your project
    {
        "require": {
            "nphp/nphp": "dev-master"
        }
    }
  • install using composer install if you installed Composer globally, or php composer.phar install if you installed it locally

Start developing

Include/require nphp.php file in your index.php and start developing, read documentation, use project skeleton for easier start or try minimal application:
<?php

require_once("nphp/nphp.php");

class IndexController extends Nphp_ControllerAbstract {
    public function get($request) {
        return "hello world!";
    }
}

$app = new Nphp_Application();
$app->setRoutes(array('^/$' => 'IndexController'));
$app->start();