2017 © Pedro Peláez
 

library fuseboxy

Super slim and easy MVC framework for PHP

image

henrygotmojo/fuseboxy

Super slim and easy MVC framework for PHP

  • Thursday, July 5, 2018
  • by henrygotmojo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Fuseboxy

Super Slim and Easy MVC framework for PHP, inspired by ColdFusion Fusebox Framework, (*1)

What is Fusebox?

Fusebox is an application framework (or methodology) invented by Steve Nelson in the 90's for ColdFusion scripting language (CFML)., (*2)

Please note that this framework is NOT a direct port of the original Fusebox framework., (*3)

This framework only applies the concept of Fusebox methodology., (*4)

Basic Concept

The main concept of Fusebox is to:, (*5)

Centralize all request to index.php, and use command to determine which files to include, (*6)

URL Convention

When urlRewrite=false, the URL format of the application looks like:, (*7)

http://{HOST}/index.php?{command}={controller}.{action}

When urlRewrite=true, the URL format of the application looks like:, (*8)

http://{HOST}/{controller}/{action}

If action was not specified in command, the framework will resolve it into index. So, the followings are the same:, (*9)

http://{HOST}/index.php?fuseaction=news
http://{HOST}/index.php?fuseaction=news.index

If both controller and action are not defined, the framework will use defaultCommand which defined in app/config/fusebox_config.php. So, the followings are the same:, (*10)

http://{HOST}/index.php
http://{HOST}/index.php?fuseaction={defaultCommand}

Example

To make a thank you page at http://{HOST}/index.php?fuseaction=site.thank, (*11)

  1. Create or edit app/controller/site_controller.php
  2. Under the switch, add a new case for the action
  3. Display content by include the view file there
  4. Done!
switch ( $fusebox->action ) :
    ...
    case 'thank':
        include 'app/view/site/thank.php';
        break;
    ...
endswitch;

formUrl2arguments

To offer a single-point-of-access to all your variables in previous page, the framework automatically creates a variable called $arguments which contains both data of $_POST and $_GET scopes., (*12)

Of course, you could still use $_POST and $_GET to access your variables, because the framework was meant to be unobtrusive., (*13)

You could turn-off this option by formUrl2arguments at the framework config file., (*14)

The Versions

05/07 2018

dev-master

9999999-dev

Super slim and easy MVC framework for PHP

  Sources   Download

MIT

The Requires

  • php 5.6.* || 7.*

 

13/04 2018

1.0.3-rc

1.0.3.0-RC

Super Slim and Easy MVC framework for PHP

  Sources   Download

MIT

The Requires

  • php 5.6.* || 7.*