File: examples/actioncontroller/index.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil  >  PHP Skeleton Framework  >  examples/actioncontroller/index.php  >  Download  
File: examples/actioncontroller/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: 5 years ago
Size: 1,087 bytes


Class file image Download
include 'config.php';

include 'A/Locator.php';
include 'A/Http/Request.php';
include 'A/Http/Response.php';
include 'A/Controller/Front.php';
include 'A/Controller/Mapper.php';
include 'A/Controller/Action.php';

$Locator = new A_Locator();
// Init autoload using Locator
require_once $ConfigArray['LIB'] . 'A/Locator.php';
$Locator = new A_Locator();

$Response = new A_Http_Response();
$Locator->set('Request', new A_Http_Request());
$Locator->set('Response', $Response);

$DefaultAction = array('', 'example', 'index');
$ErrorAction = array('', 'error', 'index');

$Mapper = new A_Controller_Mapper(dirname(__FILE__) . '/app/', $DefaultAction);

$Controller = new A_Controller_Front($Mapper, $ErrorAction);



$App = new A_Application();

$App->setPath(dirname($_SERVER['SCRIPT_FILENAME']) . 'application/');

//output content directly to screen
echo $App->run();

if (isset($_SESSION)) dump($_SESSION);

For more information send a message to info at phpclasses dot org.