From 762a0e417584a837c591cbdb8b43cfc97b0af8bc Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 13:43:41 -0500 Subject: [PATCH] Added "needs" parameter to routes. --- system/routing/route.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/routing/route.php b/system/routing/route.php index 5e409476..358b19a4 100644 --- a/system/routing/route.php +++ b/system/routing/route.php @@ -1,5 +1,6 @@ callback)) { + if (isset($this->callback['needs'])) + { + Package::load(explode(', ', $this->callback['needs'])); + } + $response = isset($this->callback['before']) ? Filter::call($this->callback['before'], array(), true) : null; if (is_null($response) and ! is_null($handler = $this->find_route_function()))