Reset to basic
This commit is contained in:
parent
b3ae041a03
commit
e09d5546e6
@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
Class Registry {
|
||||
|
||||
/*
|
||||
* @the vars array
|
||||
* @access private
|
||||
*/
|
||||
private $vars = array();
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @set undefined vars
|
||||
*
|
||||
* @param string $index
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public function __set($index, $value)
|
||||
{
|
||||
$this->vars[$index] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @get variables
|
||||
*
|
||||
* @param mixed $index
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
*/
|
||||
public function __get($index)
|
||||
{
|
||||
return $this->vars[$index];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
class router {
|
||||
/*
|
||||
* @the registry
|
||||
*/
|
||||
private $registry;
|
||||
|
||||
/*
|
||||
* @the controller path
|
||||
*/
|
||||
private $path;
|
||||
|
||||
private $args = array();
|
||||
|
||||
public $file;
|
||||
|
||||
public $controller;
|
||||
|
||||
public $action;
|
||||
|
||||
function __construct($registry) {
|
||||
$this->registry = $registry;
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*** include the controller class ***/
|
||||
include __SITE_PATH . '/application/' . 'controller_base.class.php';
|
||||
|
||||
/*** include the registry class ***/
|
||||
include __SITE_PATH . '/application/' . 'registry.class.php';
|
||||
|
||||
/*** include the router class ***/
|
||||
include __SITE_PATH . '/application/' . 'router.class.php';
|
||||
|
||||
/*** include the template class ***/
|
||||
include __SITE_PATH . '/application/' . 'template.class.php';
|
||||
|
||||
/*** auto load model classes ***/
|
||||
function __autoload($class_name) {
|
||||
$filename = strtolower($class_name) . '.class.php';
|
||||
$file = __SITE_PATH . '/model/' . $filename;
|
||||
|
||||
if (file_exists($file) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
include ($file);
|
||||
}
|
||||
|
||||
/*** a new registry object ***/
|
||||
$registry = new registry;
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user