Store a list of all paths the router knows about (backward compatibility with Net_URL_Mapper)
This commit is contained in:
parent
6e480d2458
commit
0bd26ed3f0
@ -58,6 +58,7 @@ class URLMapper
|
||||
protected $statics = array();
|
||||
protected $variables = array();
|
||||
protected $reverse = array();
|
||||
protected $allpaths = array();
|
||||
|
||||
function connect($path, $args, $paramPatterns=array())
|
||||
{
|
||||
@ -65,6 +66,8 @@ class URLMapper
|
||||
throw new Exception(sprintf("Can't connect %s; path has no action.", $path));
|
||||
}
|
||||
|
||||
$allpaths[] = $path;
|
||||
|
||||
$action = $args[self::ACTION];
|
||||
|
||||
$paramNames = $this->getParamNames($path);
|
||||
@ -223,6 +226,11 @@ class URLMapper
|
||||
|
||||
return $format;
|
||||
}
|
||||
|
||||
public function getPaths()
|
||||
{
|
||||
return $this->allpaths;
|
||||
}
|
||||
}
|
||||
|
||||
class PatternReplacer
|
||||
|
Loading…
Reference in New Issue
Block a user