Imbo\Http\Request\Request::getRoute PHP 메소드

getRoute() 공개 메소드

Get the current route
public getRoute ( ) : Imbo\Router\Route
리턴 Imbo\Router\Route
    public function getRoute()
    {
        return $this->route;
    }

Usage Example

예제 #1
0
파일: RequestTest.php 프로젝트: imbo/imbo
 /**
  * @covers Imbo\Http\Request\Request::getRoute
  * @covers Imbo\Http\Request\Request::setRoute
  */
 public function testCanSetAndGetARoute()
 {
     $this->assertNull($this->request->getRoute());
     $route = $this->getMockBuilder('Imbo\\Router\\Route')->disableOriginalConstructor()->getMock();
     $this->assertSame($this->request, $this->request->setRoute($route));
     $this->assertSame($route, $this->request->getRoute());
 }