コード例 #1
0
ファイル: ArrayCaseTest.php プロジェクト: modulework/http
 public function testPush()
 {
     $case = new ArrayCase();
     $case->push('foo');
     $case->push('bar');
     $this->assertEquals(array('foo', 'bar'), $case->all());
 }
コード例 #2
0
ファイル: Response.php プロジェクト: modulework/http
 /**
  * Send the cookies only to the client
  * @return \Modulework\Modules\Http\Response THIS
  */
 public function sendCookies()
 {
     if ($this->headerWrapper->headers_sent()) {
         return $this;
     }
     foreach ($this->cookies->all() as $cookie) {
         $this->headerWrapper->setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
     }
     return $this;
 }