Changeset 1803

Show
Ignore:
Timestamp:
02/28/07 09:37:31 (23 months ago)
Author:
david
Message:

deprecated request attribute "matchedRoutes" in "org.agavi.routing" in favor of "matched_routes", closes #465

Location:
branches/0.11
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/src/routing/AgaviRouting.class.php

    r1802 r1803  
    853853     
    854854    // set the list of matched route names as a request attribute 
    855     $req->setAttribute('matchedRoutes', $matchedRoutes, 'org.agavi.routing'); 
     855    $req->setAttribute('matched_routes', $matched_routes, 'org.agavi.routing'); 
    856856     
    857857    // return a list of matched route names 
  • branches/0.11/src/routing/AgaviWebRouting.class.php

    r1759 r1803  
    213213    if($route === null) { 
    214214      if(AgaviConfig::get('core.use_routing')) { 
    215         $routes = array_reverse($req->getAttribute('matchedRoutes', 'org.agavi.routing')); 
     215        $routes = array_reverse($req->getAttribute('matched_routes', 'org.agavi.routing')); 
    216216        $route = join('+', $routes); 
    217217        $routeMatches = array(); 
  • branches/0.11/tests2/routing/RoutingTest.php

    r1750 r1803  
    4646    $r->setInput('/anchor/child3/child2'); 
    4747    $r->execute(); 
    48     $this->assertEquals(array('testWithChild', 't1child3'), $rq->getAttribute('matchedRoutes', 'org.agavi.routing')); 
     48    $this->assertEquals(array('testWithChild', 't1child3'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 
    4949    $this->assertEquals(3, count($rd->getParameters())); 
    5050    $this->assertEquals('module3', $rd->getParameter('module')); 
     
    5757    $r->setInput('/anchor/child4/nextChild'); 
    5858    $r->execute(); 
    59     $this->assertEquals(array('testWithChild', 't1child4'), $rq->getAttribute('matchedRoutes', 'org.agavi.routing')); 
     59    $this->assertEquals(array('testWithChild', 't1child4'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 
    6060    $this->assertEquals(3, count($rd->getParameters())); 
    6161    $this->assertEquals('module4', $rd->getParameter('module')); 
     
    6868    $r->setInput('/anchor/child4/'); 
    6969    $r->execute(); 
    70     $this->assertEquals(array('testWithChild', 't1child4'), $rq->getAttribute('matchedRoutes', 'org.agavi.routing')); 
     70    $this->assertEquals(array('testWithChild', 't1child4'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 
    7171    $this->assertEquals(3, count($rd->getParameters())); 
    7272    $this->assertEquals('module4', $rd->getParameter('module')); 
     
    8989    $r->setInput('/parent/category1/MACHINE/'); 
    9090    $r->execute(); 
    91     $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matchedRoutes', 'org.agavi.routing')); 
     91    $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 
    9292    $this->assertEquals(4, count($rd->getParameters())); 
    9393    $this->assertEquals('category1', $rd->getParameter('category')); 
     
    9898    $r->setInput('/parent/MACHINE/'); 
    9999    $r->execute(); 
    100     $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matchedRoutes', 'org.agavi.routing')); 
     100    $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 
    101101    $this->assertEquals(3, count($rd->getParameters())); 
    102102    $this->assertEquals('MACHINE', $rd->getParameter('machine')); 
     
    106106    $r->setInput('/parent/MACHINE'); 
    107107    $r->execute(); 
    108     $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matchedRoutes', 'org.agavi.routing')); 
     108    $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 
    109109    $this->assertEquals(3, count($rd->getParameters())); 
    110110    $this->assertEquals('MACHINE', $rd->getParameter('machine'));