array representation backward compat for php5
This commit is contained in:
parent
fc5bfc691e
commit
d5fc9ed9db
3 changed files with 3 additions and 3 deletions
|
|
@ -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');
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue