From 5bd37e0c624b32d35f91f89450925260a81d13e5 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Mon, 18 Jun 2012 01:15:32 +0200 Subject: [PATCH] Added a way to pass the uri in the UriVoter constructor --- src/Knp/Menu/Matcher/Voter/UriVoter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Knp/Menu/Matcher/Voter/UriVoter.php b/src/Knp/Menu/Matcher/Voter/UriVoter.php index d828e449..1b0b3eaa 100644 --- a/src/Knp/Menu/Matcher/Voter/UriVoter.php +++ b/src/Knp/Menu/Matcher/Voter/UriVoter.php @@ -11,6 +11,11 @@ class UriVoter implements VoterInterface { private $uri; + public function __construct($uri = null) + { + $this->uri = $uri; + } + public function setUri($uri) { $this->uri = $uri;