From 4818c4b419c7d36a118a13c8922d599be48a57ae Mon Sep 17 00:00:00 2001 From: Shahar Evron Date: Tue, 21 Aug 2012 19:14:37 +0300 Subject: [PATCH] allowing users to check if a scheme is registered in the factory --- library/Zend/Uri/UriFactory.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/library/Zend/Uri/UriFactory.php b/library/Zend/Uri/UriFactory.php index 6871e3e1527..5e8490374e6 100644 --- a/library/Zend/Uri/UriFactory.php +++ b/library/Zend/Uri/UriFactory.php @@ -66,6 +66,23 @@ public static function unregisterScheme($scheme) } } + /** + * Get the class name for a registered scheme + * + * If provided scheme is not registered, will return NULL + * + * @param string $scheme + * @return string|null + */ + public static function getRegisteredSchemeClass($scheme) + { + if (isset(static::$schemeClasses[$scheme])) { + return static::$schemeClasses[$scheme]; + } else { + return null; + } + } + /** * Create a URI from a string *