示例#1
0
 public function appendContent($content)
 {
     $existingContent = $this->getContent();
     if (false === mb_strpos($existingContent, "</body>", null, $this->getCharset())) {
         return parent::appendContent($content);
     }
     return $this->setContent(str_replace("</body>", "{$content}</body>", $existingContent));
 }
示例#2
0
文件: Auth.php 项目: panadas/auth
 public function applyCookie(Response $response)
 {
     if ($this->hasCookie()) {
         $response->getCookies()->add($this->getCookie());
     }
     return $this;
 }
示例#3
0
 public function __construct($charset = null, Headers $headers = null, ResponseCookies $cookies = null)
 {
     parent::__construct($charset, $headers, $cookies);
     $this->setContentType("application/json");
 }