DataSift_Historic::setName PHP Method

setName() public method

Sets the name.
public setName ( string $name ) : void
$name string The new name.
return void
    public function setName($name)
    {
        if ($this->_deleted) {
            throw new DataSift_Exception_InvalidData('Cannot set the name of a deleted Historic.');
        }
        // Update locally if this query hasn't been prepared, otherwise send
        // it to the API.
        if ($this->_playback_id === false) {
            $this->_name = $name;
        } else {
            $res = $this->_user->post('historics/update', array('id' => $this->_playback_id, 'name' => $name));
            $this->reloadData();
        }
    }