Imbo\Model\Image::getFilesize PHP Method

getFilesize() public method

Get the size of the image data in bytes
public getFilesize ( ) : integer
return integer
    public function getFilesize()
    {
        return $this->filesize;
    }

Usage Example

Esempio n. 1
0
 /**
  * @covers Imbo\Model\Image::setBlob
  * @covers Imbo\Model\Image::getBlob
  * @covers Imbo\Model\Image::getFilesize
  * @covers Imbo\Model\Image::setFilesize
  * @covers Imbo\Model\Image::getChecksum
  * @covers Imbo\Model\Image::setChecksum
  */
 public function testCanSetAndGetBlob()
 {
     $blob = 'some string';
     $hash = md5($blob);
     $this->assertSame($this->image, $this->image->setBlob($blob));
     $this->assertSame($blob, $this->image->getBlob());
     $this->assertSame(11, $this->image->getFilesize());
     $this->assertSame($hash, $this->image->getChecksum());
     $blob = 'some other string';
     $hash = md5($blob);
     $this->assertSame($this->image, $this->image->setBlob($blob));
     $this->assertSame($blob, $this->image->getBlob());
     $this->assertSame(17, $this->image->getFilesize());
     $this->assertSame($hash, $this->image->getChecksum());
 }
All Usage Examples Of Imbo\Model\Image::getFilesize