2012-01-13 11:58:06 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* MiniMVC
|
|
|
|
*
|
|
|
|
* Convention-based micro-framework for PHP
|
|
|
|
*
|
2012-04-26 16:26:50 -04:00
|
|
|
* @package miniMVC
|
2012-01-13 11:58:06 -05:00
|
|
|
* @author Timothy J. Warren
|
|
|
|
* @copyright Copyright (c) 2011 - 2012
|
|
|
|
* @link https://github.com/timw4mail/miniMVC
|
|
|
|
* @license http://philsturgeon.co.uk/code/dbad-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------
|
|
|
|
|
2012-04-26 16:26:50 -04:00
|
|
|
/**
|
|
|
|
* Example Controller Class
|
|
|
|
*
|
|
|
|
* @package miniMVC
|
|
|
|
* @subpackage App
|
|
|
|
*/
|
2012-01-13 11:58:06 -05:00
|
|
|
class Welcome extends MM_Controller {
|
|
|
|
|
2012-04-26 16:26:50 -04:00
|
|
|
/**
|
|
|
|
* Initialize the constructor
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function __construct()
|
2012-01-13 11:58:06 -05:00
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
}
|
|
|
|
|
2012-04-26 16:26:50 -04:00
|
|
|
/**
|
|
|
|
* Default route for the controller
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function index()
|
2012-01-13 11:58:06 -05:00
|
|
|
{
|
2012-05-03 13:26:09 -04:00
|
|
|
$this->page->build_header();
|
|
|
|
$output = $this->page->set_message('info', "This is just a test message");
|
|
|
|
$this->page->build_footer();
|
2012-01-13 11:58:06 -05:00
|
|
|
}
|
|
|
|
|
2012-04-26 16:26:50 -04:00
|
|
|
/**
|
|
|
|
* welcome/php route
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function php()
|
2012-01-13 11:58:06 -05:00
|
|
|
{
|
|
|
|
ob_start();
|
|
|
|
phpinfo();
|
|
|
|
$output = ob_get_contents();
|
|
|
|
ob_end_clean();
|
|
|
|
|
|
|
|
$this->output->set_output($output);
|
|
|
|
}
|
2012-04-26 16:26:50 -04:00
|
|
|
}
|
|
|
|
// End of welcome.php
|