FFmpeg::set PHP Méthode

set() public méthode

public set ( string $key, string $value = null, boolen $append = false ) : object
$key string
$value string
$append boolen
Résultat object Self
    public function set($key, $value = null, $append = false)
    {
        $key = preg_replace('/^(\\-+)/', '', $key);
        if (!empty($key)) {
            if (array_key_exists($key, $this->FFmpegOptionsAS)) {
                $key = $this->FFmpegOptionsAS[$key];
            }
            if ($append === false) {
                $this->options[$key] = $value;
            } else {
                if (!array_key_exists($key, $this->options)) {
                    $this->options[$key] = array($value);
                } else {
                    if (!is_array($this->options[$key])) {
                        $this->options[$key] = array($this->options[$key], $value);
                    } else {
                        $this->options[$key][] = $value;
                    }
                }
            }
        }
        return $this;
    }