3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 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\Http
;
12 use Zend\Mvc\Router\RouteMatch
as BaseRouteMatch
;
17 class RouteMatch
extends BaseRouteMatch
20 * Length of the matched path.
27 * Create a part RouteMatch with given parameters and length.
29 * @param array $params
32 public function __construct(array $params, $length = 0)
34 parent
::__construct($params);
36 $this->length
= $length;
40 * setMatchedRouteName(): defined by BaseRouteMatch.
42 * @see BaseRouteMatch::setMatchedRouteName()
46 public function setMatchedRouteName($name)
48 if ($this->matchedRouteName
=== null) {
49 $this->matchedRouteName
= $name;
51 $this->matchedRouteName
= $name . '/' . $this->matchedRouteName
;
58 * Merge parameters from another match.
60 * @param RouteMatch $match
63 public function merge(RouteMatch
$match)
65 $this->params
= array_merge($this->params
, $match->getParams());
66 $this->length +
= $match->getLength();
68 $this->matchedRouteName
= $match->getMatchedRouteName();
74 * Get the matched path length.
78 public function getLength()