to_namespace($url, $dots)
$url : supplied url string
$prefix : a boolean value of true adds a backslash prefix
$text = to_namespace('some/url');
var_dump( $text ); // some\url
$text = to_namespace('some/url', true);
var_dump( $text ); // \some\url