/** * {@inheritDoc} */ public function encode($data) { $now = new \DateTime(); $expires = $now->add($this->ttl); $header = pack('N', $expires->getTimestamp()); return $this->delegate->encode($header . $data); }