3 * @link http://github.com/zendframework/zend-router for the canonical source repository
4 * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
5 * @license http://framework.zend.com/license/new-bsd New BSD License
11 * RouteInterface match.
20 protected $params = [];
27 protected $matchedRouteName;
30 * Create a RouteMatch with given parameters.
32 * @param array $params
34 public function __construct(array $params)
36 $this->params
= $params;
40 * Set name of matched route.
45 public function setMatchedRouteName($name)
47 $this->matchedRouteName
= $name;
52 * Get name of matched route.
56 public function getMatchedRouteName()
58 return $this->matchedRouteName
;
68 public function setParam($name, $value)
70 $this->params
[$name] = $value;
79 public function getParams()
85 * Get a specific parameter.
88 * @param mixed $default
91 public function getParam($name, $default = null)
93 if (array_key_exists($name, $this->params
)) {
94 return $this->params
[$name];