Manual talk:Title.php

Is there a function to convert $wgTitle to the Title.php format, e.g. by converting spaces to underscores? I mean, I guess one could use Title::getDBkey, but then you're not getting the whole title. Tisane 14:18, 20 March 2010 (UTC)