src/AbstractJsonEncoder.php
public function setOptions($options)
    {
        if ($this->step !== null) {
            throw new \RuntimeException('Cannot change encoding options during encoding');
        }

        $this->options = (int) $options;
        return $this;
    }
public function setOptions($options)
    {
        if ($this->step !== null) {
            throw new \RuntimeException('Cannot change encoding options during encoding');
        }

        $this->options = (int) $options;
        return $this;
    }
public function setOptions ( $ options ) { if ( $ this -> step !== null ) { throw new \ RuntimeException ( 'Cannot change encoding options during encoding' ) ; } $ this -> options = ( int ) $ options ; return $ this ; }
Sets the JSON encoding options.
@param int $options The JSON encoding options that are used by json_encode
@return $this Returns self for call chaining
@throws \RuntimeException If changing encoding options during encoding operation
Sets the JSON encoding options .