public static function factory($uri = 'http',
$className = null
) { // Separate the scheme from the scheme-specific parts
$uri =
explode(':',
$uri, 2
);
$scheme =
strtolower($uri[0
]);
$schemeSpecific =
isset($uri[1
]) === true ?
$uri[1
] : '';
if (strlen($scheme) === 0
) { throw new Zend_Uri_Exception('An empty string was supplied for the scheme'
);
} // Security check: $scheme is used to load a class file, so only alphanumerics are allowed.
if (ctype_alnum($scheme) === false
) { throw new Zend_Uri_Exception('Illegal scheme supplied, only alphanumeric characters are permitted'
);
} if ($className === null
) { /**
* Create a new Zend_Uri object for the $uri. If a subclass of Zend_Uri exists for the
* scheme, return an instance of that class. Otherwise, a Zend_Uri_Exception is thrown.
*/