PhpSandbox\PHPSandbox::setOptions PHP Method

setOptions() public method

You can pass an array of option names to set to $value, or an associative array of option names and their values to set.
public setOptions ( array | string $options, boolean | integer | null $value = null )
$options array | string Array of strings or associative array of keys of option names to set $value to, or JSON array or string template to import
$value boolean | integer | null Boolean, integer or null $value to set $option to (optional)
    public function setOptions($options, $value = null)
    {
        if (is_string($options) || is_array($options) && isset($options["options"])) {
            return $this->import($options);
        }
        foreach ($options as $name => $_value) {
            $this->setOption(is_int($name) ? $_value : $name, is_int($name) ? $value : $_value);
        }
        return $this;
    }
PHPSandbox