コード例 #1
0
 public function logoutAction()
 {
     $this->application->getView()->clearCache();
     Session::destroy();
     setcookie(session_name(), '', time() - 42000, '/');
     $response = new Response();
     $response->setCacheControl('nocache');
     $response->redirect('/');
 }
コード例 #2
0
ファイル: ResponseTest.php プロジェクト: core-framework/core
 /**
  * @covers \Core\Response\Response::setCacheControl
  */
 public function testSetCacheControlWithValue()
 {
     $response = new Response();
     $response->setCacheControl("public", 4000);
     $this->assertSame("max-age=4000, public", $response->getHeader('Cache-Control'));
 }