Guzzle\Http\CachingEntityBody::getSize PHP Method

getSize() public method

public getSize ( )
    public function getSize()
    {
        return max($this->body->getSize(), $this->remoteStream->getSize());
    }

Usage Example

 public function testChangingUnderlyingStreamUpdatesSizeAndStream()
 {
     $size = filesize(__FILE__);
     $s = fopen(__FILE__, 'r');
     $this->body->setStream($s, $size);
     $this->assertEquals($size, $this->body->getSize());
     $this->assertEquals($size, $this->decorated->getSize());
     $this->assertSame($s, $this->body->getStream());
     $this->assertSame($s, $this->decorated->getStream());
 }