array representation backward compat for php5

This commit is contained in:
Ivan Ganev 2017-11-08 18:32:56 +02:00
commit d5fc9ed9db
3 changed files with 3 additions and 3 deletions

View file

@ -165,7 +165,7 @@ documentation below for more information.
The ouput file MUST use the PNG extension. The ouput file MUST use the PNG extension.
```php ```php
$waveform = $audio->waveform(640, 120, ['#00FF00']); $waveform = $audio->waveform(640, 120, array('#00FF00'));
$waveform->save('waveform.png'); $waveform->save('waveform.png');
``` ```

View file

@ -135,7 +135,7 @@ class Audio extends AbstractStreamableMedia
* @param array $colors Array of colors for ffmpeg to use. Color format is #000000 (RGB hex string with #) * @param array $colors Array of colors for ffmpeg to use. Color format is #000000 (RGB hex string with #)
* @return Waveform * @return Waveform
*/ */
public function waveform($width = 640, $height = 120, $colors = [Waveform::DEFAULT_COLOR]) public function waveform($width = 640, $height = 120, $colors = array(Waveform::DEFAULT_COLOR))
{ {
return new Waveform($this, $this->driver, $this->ffprobe, $width, $height, $colors); return new Waveform($this, $this->driver, $this->ffprobe, $width, $height, $colors);
} }

View file

@ -33,7 +33,7 @@ class Waveform extends AbstractMediaType
*/ */
protected $colors; protected $colors;
public function __construct(Audio $audio, FFMpegDriver $driver, FFProbe $ffprobe, $width, $height, $colors = [self::DEFAULT_COLOR]) public function __construct(Audio $audio, FFMpegDriver $driver, FFProbe $ffprobe, $width, $height, $colors = array(self::DEFAULT_COLOR))
{ {
parent::__construct($audio->getPathfile(), $driver, $ffprobe); parent::__construct($audio->getPathfile(), $driver, $ffprobe);
$this->audio = $audio; $this->audio = $audio;