adding some comments to the router class.
This commit is contained in:
parent
fd42e0ca40
commit
af24e8db45
|
@ -78,6 +78,9 @@ public static function route($method, $uri)
|
|||
*/
|
||||
public static function find($name)
|
||||
{
|
||||
// --------------------------------------------------------------
|
||||
// Have we already located this route by name?
|
||||
// --------------------------------------------------------------
|
||||
if (array_key_exists($name, static::$names))
|
||||
{
|
||||
return static::$names[$name];
|
||||
|
@ -86,6 +89,9 @@ public static function find($name)
|
|||
$arrayIterator = new \RecursiveArrayIterator(static::$routes);
|
||||
$recursiveIterator = new \RecursiveIteratorIterator($arrayIterator);
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Find the named route.
|
||||
// --------------------------------------------------------------
|
||||
foreach ($recursiveIterator as $iterator)
|
||||
{
|
||||
$route = $recursiveIterator->getSubIterator();
|
||||
|
|
Loading…
Reference in New Issue