PHP Classes

Push: Rapid Web application development framework

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 219 All time: 8,284 This week: 673Up
Version License PHP version Categories
push 0.1.0MIT/X Consortium ...5.5PHP 5, Libraries, Traits
Collaborate with this project 

Author

push - github.com

Description

This package implements a rapid Web application development framework.

It provides a router class that can be configured to assign different URL patterns to given closure functions that will handle the request responses when matching URLs are accessed.

The packages provides many general purpose classes for Web application development, as well useful traits for using in other classes for debugging and handing events.

Picture of Jeremiah Ogbomo
  Performance   Level  
Name: Jeremiah Ogbomo <contact>
Classes: 3 packages by
Country: Nigeria Nigeria
Age: 30
All time rank: 360528 in Nigeria Nigeria
Week rank: 192 Up5 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 2x

Example

<?php

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

$app = new Push\Application();

// $app->uses(new \Push\Middlewares\Session);
// $app->uses(new \Push\Middlewares\Flash);
// $app->uses(new \Push\Middlewares\Database);

// Hello world from Hello controller
$app->router->any('/hello/:$input', 'Hello@index');

// Hello world from Callback
$app->router->get('/:$input', function($req, $res){
 
$content = '<h1>Hello, '.$req['input'].'!</h1>';
 
$content .= '<h2>from Route callback..</h2>';
 
$content .= '<a href="hello/world">Goto Hello Controller</a>';

 
$res->write($content);
});

$app->run();


Details

Push PHP MVC Framework

A Minimal PHP platform for rapid web application development.

Installation

It's most recommended to utilize Composer for installation.

$ composer require push/push "@dev"

This installs Push and it requires PHP 5.5.0 or newer.

Usage

Create an index.php file with the following contents:

<?php

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

$app = new Push\Application();

// Hello world from Hello controller
$app->router->any('/hello/:$input', 'Hello@index');

// Hello world from Callback
$app->router->get('/:$input', function($req, $res){
	$content = '<h1>Hello, '.$req['input'].'!</h1>';
	$content .= '<h2>from Route callback..</h2>';
	$content .= '<a href="hello/world">Goto Hello Controller</a>';

	$res->write($content);
});

$app->run();

The rest of the Application's configurations and structure is described in th example's directory.

You may quickly test this using the built-in PHP server:

$ php -S localhost:3000

Go to http://localhost:3000 to see Push framework in action.

Credits

License

The Push Framework is licensed under the MIT license. See License File for more information.


  Files folder image Files (75)  
File Role Description
Files folder imageexample (3 files, 2 directories)
Files folder imagePush (5 files, 13 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License
Plain text file push.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (75)  /  example  
File Role Description
Files folder imageApp (4 directories)
Files folder imageconfig (1 file)
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files (75)  /  example  /  App  
File Role Description
Files folder imageController (1 file)
Files folder imageincludes (1 file)
Files folder imageModel (1 file)
Files folder imageView (1 file)

  Files folder image Files (75)  /  example  /  App  /  Controller  
File Role Description
  Plain text file Hello.php Class Class source

  Files folder image Files (75)  /  example  /  App  /  includes  
File Role Description
  Plain text file events.php Class Class source

  Files folder image Files (75)  /  example  /  App  /  Model  
File Role Description
  Plain text file Index.php Class Class source

  Files folder image Files (75)  /  example  /  App  /  View  
File Role Description
  Plain text file index.tpl.php Class Class source

  Files folder image Files (75)  /  example  /  config  
File Role Description
  Accessible without login Plain text file config.php Example Example script

  Files folder image Files (75)  /  Push  
File Role Description
Files folder imageComponents (8 files)
Files folder imageCore (6 files)
Files folder imageExceptions (7 files)
Files folder imageExtensions (3 files)
Files folder imageHttp (8 files)
Files folder imageIncludes (2 files)
Files folder imageInterfaces (3 files)
Files folder imageMiddlewares (3 files)
Files folder imageModules (2 files)
Files folder imageServices (1 file)
Files folder imageTraits (2 files)
Files folder imageUtils (10 files)
Files folder imageViews (2 files)
  Plain text file Application.php Class Class source
  Plain text file Controller.php Class Class source
  Plain text file Middleware.php Class Class source
  Plain text file Model.php Class Class source
  Plain text file View.php Class Class source

  Files folder image Files (75)  /  Push  /  Components  
File Role Description
  Plain text file Form.php Class Class source
  Plain text file ImageHandler.php Class Class source
  Plain text file Mail.php Class Class source
  Plain text file Pagination.php Class Class source
  Plain text file Share.php Class Class source
  Plain text file Theme.php Class Class source
  Plain text file UploadHandler.php Class Class source
  Plain text file Uploads.php Class Class source

  Files folder image Files (75)  /  Push  /  Core  
File Role Description
  Plain text file Cache.php Class Class source
  Plain text file Config.php Class Class source
  Plain text file MiddlewareObject.php Class Class source
  Plain text file MiddlewareQueue.php Class Class source
  Plain text file Module.php Class Class source
  Plain text file Service.php Class Class source

  Files folder image Files (75)  /  Push  /  Exceptions  
File Role Description
  Plain text file ApiException.php Class Class source
  Plain text file MethodNotAllowedException.php Class Class source
  Plain text file NotFoundException.php Class Class source
  Plain text file OfflineException.php Class Class source
  Plain text file SkipException.php Class Class source
  Plain text file StopException.php Class Class source
  Plain text file ViewException.php Class Class source

  Files folder image Files (75)  /  Push  /  Extensions  
File Role Description
  Plain text file ImageHandler.php Class Class source
  Plain text file Install.php Class Class source
  Plain text file Mimes.php Class Class source

  Files folder image Files (75)  /  Push  /  Http  
File Role Description
  Plain text file Environment.php Class Class source
  Plain text file Request.php Class Class source
  Plain text file Response.php Class Class source
  Plain text file Route.php Class Class source
  Plain text file RouteObject.php Class Class source
  Plain text file Router.php Class Class source
  Plain text file Upload.php Class Class source
  Plain text file Uri.php Class Class source

  Files folder image Files (75)  /  Push  /  Includes  
File Role Description
  Plain text file functions.php Class Class source
  Accessible without login HTML file index.html Doc. Documentation

  Files folder image Files (75)  /  Push  /  Interfaces  
File Role Description
  Plain text file ApplicationInterface.php Class Class source
  Plain text file MiddlewareInterface.php Class Class source
  Plain text file ViewInterface.php Class Class source

  Files folder image Files (75)  /  Push  /  Middlewares  
File Role Description
  Plain text file Database.php Class Class source
  Plain text file Flash.php Class Class source
  Plain text file Session.php Class Class source

  Files folder image Files (75)  /  Push  /  Modules  
File Role Description
  Plain text file Admin.php Class Class source
  Plain text file Api..php Class Class source

  Files folder image Files (75)  /  Push  /  Services  
File Role Description
  Plain text file Error.php Class Class source

  Files folder image Files (75)  /  Push  /  Traits  
File Role Description
  Plain text file Debugger.php Class Class source
  Plain text file Events.php Class Class source

  Files folder image Files (75)  /  Push  /  Utils  
File Role Description
  Plain text file Bench.php Class Class source
  Plain text file Bread.php Class Class source
  Plain text file Collection.php Class Class source
  Plain text file Encrypt.php Class Class source
  Plain text file Num.php Class Class source
  Plain text file Set.php Class Class source
  Plain text file Str.php Class Class source
  Plain text file Time.php Class Class source
  Plain text file Timer.php Class Class source
  Plain text file Uri.php Class Class source

  Files folder image Files (75)  /  Push  /  Views  
File Role Description
  Plain text file Php.php Class Class source
  Plain text file Twig.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:219
This week:0
All time:8,284
This week:673Up