router class added

This commit is contained in:
Josh North 2014-08-23 23:14:53 -04:00
parent b32598c3ce
commit b3ae041a03
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,44 @@
<?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];
}
}
?>

View File

@ -0,0 +1,24 @@
<?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;
}