for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the PHP-FFmpeg-video-streaming package.
*
* (c) Amin Yazdanpanah <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Streaming;
use Streaming\Exception\Exception;
class Representation
{
private $kiloBitrate = 1000;
private $resize = '';
private $width = 0;
private $height = 0;
* @return mixed
public function getResize()
return $this->resize;
}
* @param $width
* @param $height
* @return Representation
* @throws Exception
public function setResize(int $width, int $height): Representation
if ($width < 1 || $height < 1) {
throw new Exception('Wrong resize value');
$this->width = $width;
$this->height = $height;
$this->resize = $width . "x" . $height;
return $this;
* @return int
public function getKiloBitrate()
return $this->kiloBitrate;
* Sets the kiloBitrate value.
* @param integer $kiloBitrate
public function setKiloBitrate($kiloBitrate)
if ($kiloBitrate < 1) {
throw new Exception('Wrong kilo bit rate value');
$this->kiloBitrate = (int)$kiloBitrate;
public function getWidth(): int
return $this->width;
public function getHeight(): int
return $this->height;