Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Mvc / Router / RouteMatch.php
blob9cbeff44bedf25da329f55e702e98019c35d954a
1 <?php
2 /**
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
8 */
10 namespace Zend\Mvc\Router;
12 /**
13 * RouteInterface match.
15 class RouteMatch
17 /**
18 * Match parameters.
20 * @var array
22 protected $params = array();
24 /**
25 * Matched route name.
27 * @var string
29 protected $matchedRouteName;
31 /**
32 * Create a RouteMatch with given parameters.
34 * @param array $params
36 public function __construct(array $params)
38 $this->params = $params;
41 /**
42 * Set name of matched route.
44 * @param string $name
45 * @return RouteMatch
47 public function setMatchedRouteName($name)
49 $this->matchedRouteName = $name;
50 return $this;
53 /**
54 * Get name of matched route.
56 * @return string
58 public function getMatchedRouteName()
60 return $this->matchedRouteName;
63 /**
64 * Set a parameter.
66 * @param string $name
67 * @param mixed $value
68 * @return RouteMatch
70 public function setParam($name, $value)
72 $this->params[$name] = $value;
73 return $this;
76 /**
77 * Get all parameters.
79 * @return array
81 public function getParams()
83 return $this->params;
86 /**
87 * Get a specific parameter.
89 * @param string $name
90 * @param mixed $default
91 * @return mixed
93 public function getParam($name, $default = null)
95 if (array_key_exists($name, $this->params)) {
96 return $this->params[$name];
99 return $default;