From b31c5f0b99399e785a6bf347de162e958a1433d3 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 26 Dec 2006 02:29:58 +0000 Subject: [PATCH] Controller directories can now be prefixed --- Router.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Router.php b/Router.php index efb48f2..f1429bd 100644 --- a/Router.php +++ b/Router.php @@ -229,8 +229,9 @@ class BSRouter * the file name without the .php extension * * @param string Search path + * @param string Prefix for the requests */ - public function addControllerDirectory($path) + public function addControllerDirectory($path, $prefix = '') { $path = BSFunctions::FetchSourcePath($path); $controllers = BSFunctions::ScanDirectory($path); @@ -238,7 +239,7 @@ class BSRouter foreach ($controllers AS $file) { $controller = str_replace('.php', '', $file); - $this->addController($controller, $path . $controller); + $this->addController($prefix . $controller, $path . $controller); } } -- 2.43.5