public function savePath($path = null)
    {
        if ($path === null) {
            return session_save_path();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($path)) {
            throw new \InvalidArgumentException('Session path must be null or a string');
        }
        if (!is_dir($path)) {
            throw new \InvalidArgumentException("Path not found: {$path}");
        }
        session_save_path($path);
    }
public function savePath($path = null)
    {
        if ($path === null) {
            return session_save_path();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($path)) {
            throw new \InvalidArgumentException('Session path must be null or a string');
        }
        if (!is_dir($path)) {
            throw new \InvalidArgumentException("Path not found: {$path}");
        }
        session_save_path($path);
    }
public function savePath ( $ path = null ) { if ( $ path === null ) { return session_save_path ( ) ; } if ( $ this -> isOpen ) { throw new \ InvalidArgumentException ( 'The session has already been opened.' ) ; } if ( ! is_string ( $ path ) ) { throw new \ InvalidArgumentException ( 'Session path must be null or a string' ) ; } if ( ! is_dir ( $ path ) ) { throw new \ InvalidArgumentException ( "Path not found: {$path}" ) ; } session_save_path ( $ path ) ; }
Sets or gets the current session save path.

@param string|null $path

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