Kraken\Util\Buffer\BufferInterface::drain PHP Method

drain() public method

Remove and return all data from the buffer.
public drain ( ) : string
return string
    public function drain();

Usage Example

Example #1
0
 public function testApiDrain_EmptiesBuffer()
 {
     $result = $this->buffer->drain();
     $this->assertSame($this->initialString, $result);
     $this->assertSame('', (string) $this->buffer);
     $this->assertTrue($this->buffer->isEmpty());
 }
All Usage Examples Of Kraken\Util\Buffer\BufferInterface::drain