Permalink
Browse files

Reorganizing directory structure so project can be included in other …

…projects with PSR-0 compliance.
  • Loading branch information...
1 parent ca1f7f5 commit 1009e8b5c470a3de0f841b019552f337de7d0aa8 @deceze committed Oct 24, 2012
@@ -2,7 +2,7 @@
namespace Kunststube\Router;
-require_once 'Kunststube/Router/Route.php';
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'Route.php';
class CaseInsensitiveRoute extends Route {
@@ -2,8 +2,8 @@
namespace Kunststube\Router;
-require_once 'Kunststube/Router/RouteFactory.php';
-require_once 'Kunststube/Router/CaseInsensitiveRoute.php';
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'RouteFactory.php';
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'CaseInsensitiveRoute.php';
class CaseInsensitiveRouteFactory extends RouteFactory {
File renamed without changes.
@@ -2,7 +2,7 @@
namespace Kunststube\Router;
-require_once 'Kunststube/Router/Route.php';
+require_once __DIR__ . DIRECTORY_SEPARATOR . 'Route.php';
class RouteFactory {
@@ -18,7 +18,7 @@ class Router {
*/
public function __construct(RouteFactory $routeFactory = null) {
if (!$routeFactory) {
- require_once 'Kunststube/Router/RouteFactory.php';
+ require_once __DIR__ . DIRECTORY_SEPARATOR . 'RouteFactory.php';
$routeFactory = new RouteFactory;
}
$this->routeFactory = $routeFactory;
View
@@ -474,6 +474,11 @@ This is mainly useful as efficient way to generate a URL for similar routes. Usi
Use this feature with care, since explicitly *not* all defined routes are being evaluated and you may get results different from when you'd use reverse routing.
+PSR-0
+-----
+
+The repository is organized so its contents can be dumped into a folder `Kunststube/Router/` and the naming be PSR-0 compliant.
+
Information
-----------
@@ -4,9 +4,9 @@
Kunststube\Router\CaseInsensitiveRoute,
Kunststube\Router\CaseInsensitiveRouteFactory;
-require_once 'Kunststube/Router/Router.php';
-require_once 'Kunststube/Router/CaseInsensitiveRoute.php';
-require_once 'Kunststube/Router/CaseInsensitiveRouteFactory.php';
+require_once 'Router.php';
+require_once 'CaseInsensitiveRoute.php';
+require_once 'CaseInsensitiveRouteFactory.php';
class CaseInsensitiveRouteTest extends PHPUnit_Framework_TestCase {
@@ -2,7 +2,7 @@
use Kunststube\Router\Route;
-require_once 'Kunststube/Router/Route.php';
+require_once 'Route.php';
class RouteTest extends PHPUnit_Framework_TestCase {
@@ -3,7 +3,7 @@
use Kunststube\Router\Router,
Kunststube\Router\Route;
-require_once 'Kunststube/Router/Router.php';
+require_once 'Router.php';
class RouterTest extends PHPUnit_Framework_TestCase {

0 comments on commit 1009e8b

Please sign in to comment.