Пример #1
0
 /**
  * Merge parameters from another match.
  * 
  * @param  self $match
  * @return self
  */
 public function merge(self $match)
 {
     $this->params = array_merge($this->params, $match->getParams());
     $this->length += $match->getLength();
     $this->matchedRouteName = $match->getMatchedRouteName();
     return $this;
 }
Пример #2
0
 public function testLengthIsMerged()
 {
     $match = new RouteMatch(array(), 10);
     $match->merge(new RouteMatch(array(), 5));
     $this->assertEquals(15, $match->getLength());
 }