Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function close()
 {
     if ($this->stream !== NULL) {
         if (strlen($this->buffer)) {
             $this->stream->write(sprintf("%X\r\n%s\r\n0\r\n\r\n", strlen($this->buffer), $this->buffer));
             $this->buffer = '';
         } else {
             $this->stream->write("0\r\n\r\n");
         }
     }
     parent::close();
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function close()
 {
     set_error_handler($this->handleError());
     try {
         $chunk = inflate_add($this->context, $this->buffer, ZLIB_FINISH);
     } finally {
         $this->buffer = '';
         restore_error_handler();
     }
     if ($this->stream !== NULL) {
         $this->stream->write($chunk);
         parent::close();
     }
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function close()
 {
     $chunk = deflate_add($this->context, $this->buffer, ZLIB_FINISH);
     $this->buffer = '';
     if ($this->stream !== NULL) {
         $this->stream->write($chunk);
         parent::close();
     }
 }