Nette\Http\Session::setName PHP Method

setName() public method

Sets the session name to a specified one.
public setName ( $name ) : self
return self
    public function setName($name)
    {
        if (!is_string($name) || !preg_match('#[^0-9.][^.]*\\z#A', $name)) {
            throw new Nette\InvalidArgumentException('Session name must be a string and cannot contain dot.');
        }
        session_name($name);
        return $this->setOptions(['name' => $name]);
    }