private static function video_utility::getStreamBaseMapping in Video 7.2
Maintains a mapping from scheme to external URL prefix.
Return value
Array from string to string.
1 call to video_utility::getStreamBaseMapping()
- video_utility::urlToUri in ./
video.utility.inc - Finds a stream wrapper using the output URL.
File
- ./
video.utility.inc, line 91 - This file will be used to keep all utility functions data structures.
Class
- video_utility
- Helper functions for the Video module.
Code
private static function getStreamBaseMapping() {
if (self::$streamBaseMapping != NULL) {
return self::$streamBaseMapping;
}
self::$streamBaseMapping = array();
foreach (file_get_stream_wrappers() as $wrapperscheme => $wrapperinfo) {
$wrapper = file_stream_wrapper_get_instance_by_scheme($wrapperscheme);
$externalUrl = $wrapper
->getExternalUrl();
// Some stream wrappers, like the ones that derive from
// MediaReadOnlyStreamWrapper, return no default external URL. Ignore
// those, they're not useful for the Video module anyway.
if (!empty($externalUrl)) {
self::$streamBaseMapping[$wrapperscheme] = $externalUrl;
}
}
return self::$streamBaseMapping;
}