예제 #1
0
파일: Base128.php 프로젝트: undr/phpbuf
 /**
  * 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));
 }
예제 #2
0
파일: Reader.php 프로젝트: undr/phpbuf
 public static function createFromWriter(PhpBuf_IO_Writer_Interface $writer)
 {
     return new PhpBuf_IO_Reader($writer->getData());
 }