Permalink
Browse files

allowing users to check if a scheme is registered in the factory

  • Loading branch information...
1 parent e4d501f commit 4818c4b419c7d36a118a13c8922d599be48a57ae @shevron shevron committed Aug 21, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 library/Zend/Uri/UriFactory.php
@@ -67,6 +67,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
*
* @param string $uriString

0 comments on commit 4818c4b

Please sign in to comment.