Eccube\Event\EventArgs::getResponse PHP Method

getResponse() public method

public getResponse ( ) : Response
return Symfony\Component\HttpFoundation\Response
    public function getResponse()
    {
        return $this->response;
    }

Usage Example

Example #1
0
 public function testResponse()
 {
     $event = new EventArgs(array());
     $this->assertNull($event->getResponse());
     $this->assertFalse($event->hasResponse());
     // 通常のレスポンスの検証
     $response = new Response();
     $event->setResponse($response);
     $this->assertNotNull($event->getResponse());
     $this->assertTrue($event->hasResponse());
     // リダイレクトレスポンスの検証
     $response = new RedirectResponse('http://www.ec-cube.net/');
     $event->setResponse($response);
     $this->assertNotNull($event->getResponse());
     $this->assertTrue($event->hasResponse());
 }