MessagePack\Unpacker::unpack PHP Method

unpack() public method

public unpack ( $data )
    public function unpack($data)
    {
        return $this->bufferUnpacker->reset($data)->unpack();
    }

Usage Example

Example #1
0
 public function testUnpack()
 {
     $this->bufferUnpacker->expects($this->once())->method('reset')->with('foo')->willReturn($this->bufferUnpacker);
     $this->bufferUnpacker->expects($this->once())->method('unpack')->willReturn('bar');
     $this->assertSame('bar', $this->unpacker->unpack('foo'));
 }