Exemple #1
0
 /**
  * Encode value and write to PhpBuf_IO_Writer_Interface
  *
  * @param PhpBuf_IO_Writer_Interface $writer
  */
 public static function encodeToWriter(PhpBuf_IO_Writer_Interface $writer, $value)
 {
     $writer->writeBytes(self::encode($value));
 }
Exemple #2
0
 public static function createFromWriter(PhpBuf_IO_Writer_Interface $writer)
 {
     return new PhpBuf_IO_Reader($writer->getData());
 }