/** * 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)); }
public static function createFromWriter(PhpBuf_IO_Writer_Interface $writer) { return new PhpBuf_IO_Reader($writer->getData()); }