3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Mvc\Router
;
13 * RouteInterface match.
22 protected $params = array();
29 protected $matchedRouteName;
32 * Create a RouteMatch with given parameters.
34 * @param array $params
36 public function __construct(array $params)
38 $this->params
= $params;
42 * Set name of matched route.
47 public function setMatchedRouteName($name)
49 $this->matchedRouteName
= $name;
54 * Get name of matched route.
58 public function getMatchedRouteName()
60 return $this->matchedRouteName
;
70 public function setParam($name, $value)
72 $this->params
[$name] = $value;
81 public function getParams()
87 * Get a specific parameter.
90 * @param mixed $default
93 public function getParam($name, $default = null)
95 if (array_key_exists($name, $this->params
)) {
96 return $this->params
[$name];