PHP Classes

Potato PHP MVC Framework: Framework to develop PHP MVC applications

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: 114 All time: 9,593 This week: 673Up
Version License PHP version Categories
potatoframework 0.5GNU General Publi...7.3Libraries, Design Patterns, PHP 7
Description 

Author

This package provides a framework to develop PHP MVC applications.

It provides classes to implement common model, view and controller classes for implementing many services that Web applications need.

Applications need to specify the details of operation in an array that is defined in a configuration script. Those details include the routes that define how each request is forwarded to application controller classes, database access credentials, email delivery configuration, etc..

Picture of Maicon gonçalez
  Performance   Level  
Innovation award
Innovation award
Nominee: 3x

 

Example

<?php
define
("ENVIRONMENT", "development"); //production, development

define("ROOT_PATH", __DIR__);
define("BASE_PATH", __DIR__."/App/");
define("BASE_PATH_CACHE", __DIR__."/App/Cache/");
define("BASE_PATH_THIRD", __DIR__."/App/Third/");
define("BASE_PATH_MODELS", __DIR__."/App/Models/");
define("BASE_PATH_VIEWS", __DIR__."/App/Views/");
define("BASE_PATH_MODULES", __DIR__."/App/Modules/");

define("TEMPLATE_ENGINE_SMARTY","smarty");
define("TEMPLATE_WITHOUT_ENGINE","without");

switch (
ENVIRONMENT){
    case
'development':
       
error_reporting(-1);
       
ini_set('display_errors', 1);
        break;
    case
'testing':
    case
'production':
       
ini_set('display_errors', 0);
       
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
        break;
    default:
       
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
        echo
'The application environment is not set correctly.';
        exit(
1);
}

require_once
"vendor/autoload.php";
require_once
"App/System/Core/Functions/DefaultFunctions.php";

set_error_handler("handler_error");
set_exception_handler('handler_exception');
spl_autoload_register('loaderFastApp');
register_shutdown_function("shutdownHandler");

require_once
"App/Configs/Config.php";
require_once
"App/Configs/Hooks.php";

date_default_timezone_set($GLOBALS['Config']['timezone']);

$App = new \System\FastApp();


Details

PotatoFramework

Framework em PHP


  Files folder image Files (69)  
File Role Description
Files folder imageApp (7 directories)
Files folder imagepublic (1 directory)
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
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file SECURITY.md Data Auxiliary data

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:114
This week:0
All time:9,593
This week:673Up
User Comments (2)