Skip to content

Commit

Permalink
allowing users to check if a scheme is registered in the factory
Browse files Browse the repository at this point in the history
  • Loading branch information
shevron committed Aug 21, 2012
1 parent e4d501f commit 4818c4b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions library/Zend/Uri/UriFactory.php
Expand Up @@ -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
*
Expand Down

0 comments on commit 4818c4b

Please sign in to comment.