PHP Classes

Lego PHP: Blog and shopping cart system

Recommend this page to a friend!
  Info   Example   Demos   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: 192 All time: 8,570 This week: 43Up
Version License PHP version Categories
legophp 1.0.0Custom (specified...5PHP 5, E-Commerce, Blogs
Description 

Author

This package implements a blog and shopping cart system.

It provides complete scripts and classes to implement a blog system with support for shopping cart pages.

Picture of Duong Huynh Nghia
  Performance   Level  
Innovation award
Innovation award
Nominee: 1x

 

Example

<?php
use APP\Engine\AppException;
use
APP\Engine\Logger;

@
error_reporting(E_ALL);
@
ini_set('display_errors', -1);
if (
version_compare(PHP_VERSION, '5.3.0', '<'))
{
    throw new
Exception('Requires PHP version 5.3 or higher.');
}
define('SIMPLE_APP', true);
define('APP_DS', DIRECTORY_SEPARATOR);
define('APP_ROOT_PATH', dirname(__FILE__) . APP_DS);
define('APP_PATH', APP_ROOT_PATH . "Application" . APP_DS);
define('APP_PATH_SETTING', APP_PATH . 'Setting' . APP_DS);
define('APP_PATH_LIB', APP_ROOT_PATH . 'Library' . APP_DS);
require_once
APP_PATH_SETTING . 'Loader.php';
ob_start('system_gzhandler');
if (!
session_id())
{
   
session_start();
}
try
{

    if(
HAS_CONFIG_FILE == false){
       
header('Location:install.php');
        exit;
    }
   
$mainApp = new APP\Engine\Application($_CONF);
   
$mainApp->execute();
} catch (
Exception $ex)
{
    if (
$mainApp instanceof APP\Engine\Application)
    {
        if (
$mainApp->isAjaxCall())
        {
           
system_display_result(array(
               
'code' => $ex->getCode(),
               
'message' => $ex->getMessage(),
            ));
        }
    }
    if ((
$ex instanceof AppException))
    {
       
$sSystemCode = $ex->hashCode();
    } else
    {
       
$sSystemCode = (new AppException())->hashCode();
    }
   
$sTrace = $ex->getTraceAsString();
   
$mDisplay = array(
       
'code' => $ex->getCode(),
       
'message' => $ex->getMessage(),
       
'trace' => $sTrace,
       
'system_code' => $sSystemCode,
    );
    if (
$ex->getCode() == HTTP_CODE_NOT_FOUND)
    {
       
$sTemplateErrorCode = "Notfound";
    } else
    {
       
$sTemplateErrorCode = "Error";
    }
   
Logger::error($ex, $sSystemCode);
    if (
APP\Engine\Application::getInstance()->template)
    {
        echo
               
APP\Engine\Application::getInstance()->template->
               
setParams($mDisplay)->render($sTemplateErrorCode);
    } else
    {
       
system_display_result($mDisplay);
    }
}
ob_end_flush();
?>


Details

legophp

Another PHP Framework


  Files folder image Files (3028)  
File Role Description
Files folder image.settings (2 files)
Files folder imageApplication (3 directories)
Files folder imageDevTool (2 files)
Files folder imageEngine (27 files, 4 directories)
Files folder imageInstall (1 directory)
Files folder imageLibrary (6 files, 6 directories)
Accessible without login Plain text file .buildpath Data Auxiliary data
Accessible without login Plain text file .htaccess Data Auxiliary data
Accessible without login Plain text file .project Data Auxiliary data
Accessible without login Plain text file build.log Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file install.php Example Example script
Accessible without login Plain text file README.md Data Auxiliary data
Accessible without login Plain text file unit-test.php Example Example script

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:192
This week:0
All time:8,570
This week:43Up