src/Replication/ReplicationStrategy.php
public function setScriptReadOnly($script, $readonly = true)
    {
        $sha1 = sha1($script);

        if ($readonly) {
            $this->readonlySHA1[$sha1] = $readonly;
        } else {
            unset($this->readonlySHA1[$sha1]);
        }
    }
public function setScriptReadOnly($script, $readonly = true)
    {
        $sha1 = sha1($script);

        if ($readonly) {
            $this->readonlySHA1[$sha1] = $readonly;
        } else {
            unset($this->readonlySHA1[$sha1]);
        }
    }
public function setScriptReadOnly ( $ script , $ readonly = true ) { $ sha1 = sha1 ( $ script ) ; if ( $ readonly ) { $ this -> readonlySHA1 [ $ sha1 ] = $ readonly ; } else { unset ( $ this -> readonlySHA1 [ $ sha1 ] ) ; } }
Marks a Lua script for EVAL and EVALSHA as a read-only operation. When
the behaviour of a script can be decided only at runtime depending on
its arguments, a callable object can be provided to dynamically check
if the passed instance of EVAL or EVALSHA performs write operations or
not.

@param string $script   Body of the Lua script.
@param mixed  $readonly A boolean value or a callable object.
Marks a Lua script for EVAL and EVALSHA as a read - only operation . When the behaviour of a script can be decided only at runtime depending on its arguments a callable object can be provided to dynamically check if the passed instance of EVAL or EVALSHA performs write operations or not .