There are some basic things to note about what you're trying to do.
First and foremost, you are better off using the php5 magic functions of construct() and destruct() to control items during the initialization (or destroying) of objects.
Secondly, you probably only want only one instance of your particular controller, which is where the Singleton pattern comes into play (something for you to read up on).
If you're not familiar with how MVC actually works, I'd take a few hours to read up on it, and make sure you understand how it really works.
Ultimately you should have one file which constructs your basic controller class (in this instance Kabbit_Controller_Action). Inside that class should be a function (either static or not) which controls what child-class is used and what method is called of that class.
For example:
index.php
<?php
require_once('Kabbit/Controller/Action.php');
$controller = Kabbit_Controller_Action::getInstance();
$controller->dispatch();
The index.php file would be in your websites document root and is responsible for handling those requests that aren't handled by Apache according to the .htaccess file you should have set up to route all non image / static file requests.
So then in your Kabbit_Controller_Action class you'd have:
<?php
class Kabbit_Controller_Action
{
public $_instance = null;
public function __construct()
{
// Called for every new instance of this class.
// Basic initialization stuff can go here
}
/**
* Implement the singleton pattern
*/
static public function getInstance()
{
if(is_null(self::$_instance))
{
self::$_instance = new self();
}
return self::$_instance;
}
public function dispatch()
{
// Code to look at the URL for the "module", "controller", and "action" would go here
$url = $_SERVER['REQUEST_URI'];
preg_match('~^/(.*)(?:/(.*)?)?(?:/(.*)?)?~iUs', $url, $matches);
$module = isset($matches[3]) ? $matches[1] : null;
$controller = isset($matches[3]) ? $matches[2] : $matches[1];
if(is_null($module))
{
$action = isset($matches[2]) ? $matches[2] : 'index';
}
else
{
$action = isset($matches[3]) ? $matches[3] : 'index';
}
// Attempt to include that proper controller class
$file = (!is_null($module) ? ucwords($module).'/' : null);
$file .= (!is_null($controller) ? ucwords($controller).'/' : 'Index/';
$file .= 'Controller.php';
if(!file_exists($file))
{
throw new Exception ('Controller "'.$file.'" not found!');
}
$controller = str_replace('/', '_', $file);
$controller = substr($controller, 0, -4);
$actionController = new $controller();
$actionController->$action();
return $this;
}
}
That's a crude example, but more in-line with php5 items.
I do wonder why you're rolling your own framework, when there are plenty of other good frameworks to build off of. Zend is a good platform, and if you're in a pinch, CakePHP can be a quick development platform (although I despise it). Symfony is another framework to look at as a base as well.