PHP Classes

File: examples/projectx/index.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/projectx/index.php   Download  
File: examples/projectx/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 1,159 bytes
 

Contents

Class file image Download
<?php
require 'config.php';
require
$ConfigArray['LIB'] . 'A/Locator.php';

$Locator = new A_Locator();
$Locator->autoload(); // initializing autoloading

$Config = new A_Collection($ConfigArray);
$Request = new A_Http_Request();
$Response = new A_Http_Response();
$Response->setTemplate('layouts/main.php');
$Response->set('BASE', $ConfigArray['BASE']);
$Response->set('title', $ConfigArray['TITLE']);
$Response->set('head', '');

$Session = new A_Session();
$UserSession = new A_User_Session($Session);

$Locator->set('Config', $Config);
$Locator->set('Request', $Request);
$Locator->set('Response', $Response);
$Locator->set('Session', $Session);
$Locator->set('UserSession', $UserSession);

$Router = new A_Http_Pathinfo();
$Router->run($Request);

$Mapper = new A_Controller_Mapper($ConfigArray['APP'], array('', 'home', ''));

$Controller = new A_Controller_Front($Mapper, array('', 'error', ''));
$Controller->addPreFilter(new A_User_Prefilter_Group($Session, array('','user','login')));
$Controller->run($Locator);

$Response->run($Locator);
echo
$Response->render();

echo
$Controller->getErrorMsg(', ');