DataSift\Storyplayer\PlayerLib\Story_Checkpoint::__set PHP Method

__set() public method

throws the E5xx_CheckpointIsReadOnly exception if you attempt to store data when the checkpoint is in readonly mode
public __set ( string $key, mixed $value ) : void
$key string the name of the data to store
$value mixed the value to store in the checkpoint
return void
    public function __set($key, $value)
    {
        // what are we doing?
        $log = usingLog()->startAction("store '{$key}' in the checkpoint");
        // are we allowed to change the data at this time?
        if ($this->readOnly) {
            // no, we are not
            $log->endAction("checkpoint is readonly; did not store '{$key}'");
            throw new E5xx_CheckpointIsReadOnly();
        }
        // if we get here, we're allowed to change the checkpoint
        $this->data[$key] = $value;
        // all done
        $log->endAction($value);
    }