public function sessionName($name = null)
    {
        if ($name === null) {
            return session_name();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($name)) {
            throw new \InvalidArgumentException('Session name must be null or a string');
        }
        session_name($name);
    }
public function sessionName($name = null)
    {
        if ($name === null) {
            return session_name();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($name)) {
            throw new \InvalidArgumentException('Session name must be null or a string');
        }
        session_name($name);
    }
public function sessionName ( $ name = null ) { if ( $ name === null ) { return session_name ( ) ; } if ( $ this -> isOpen ) { throw new \ InvalidArgumentException ( 'The session has already been opened.' ) ; } if ( ! is_string ( $ name ) ) { throw new \ InvalidArgumentException ( 'Session name must be null or a string' ) ; } session_name ( $ name ) ; }
Sets or gets the session name.

@param string $name the session name for the current session

@throws \InvalidArgumentException
@return string the current session name
Sets or gets the session name .