Chris@0: /** Chris@0: * Implements hook_stream_wrappers(). Chris@0: */ Chris@0: function {{ machine_name }}_stream_wrappers() { Chris@0: return array( Chris@0: 'public' => array( Chris@0: 'name' => t('Public files'), Chris@0: 'class' => 'DrupalPublicStreamWrapper', Chris@0: 'description' => t('Public local files served by the webserver.'), Chris@0: 'type' => STREAM_WRAPPERS_LOCAL_NORMAL, Chris@0: ), Chris@0: 'private' => array( Chris@0: 'name' => t('Private files'), Chris@0: 'class' => 'DrupalPrivateStreamWrapper', Chris@0: 'description' => t('Private local files served by Drupal.'), Chris@0: 'type' => STREAM_WRAPPERS_LOCAL_NORMAL, Chris@0: ), Chris@0: 'temp' => array( Chris@0: 'name' => t('Temporary files'), Chris@0: 'class' => 'DrupalTempStreamWrapper', Chris@0: 'description' => t('Temporary local files for upload and previews.'), Chris@0: 'type' => STREAM_WRAPPERS_LOCAL_HIDDEN, Chris@0: ), Chris@0: 'cdn' => array( Chris@0: 'name' => t('Content delivery network files'), Chris@0: 'class' => 'MyModuleCDNStreamWrapper', Chris@0: 'description' => t('Files served by a content delivery network.'), Chris@0: // 'type' can be omitted to use the default of STREAM_WRAPPERS_NORMAL Chris@0: ), Chris@0: 'youtube' => array( Chris@0: 'name' => t('YouTube video'), Chris@0: 'class' => 'MyModuleYouTubeStreamWrapper', Chris@0: 'description' => t('Video streamed from YouTube.'), Chris@0: // A module implementing YouTube integration may decide to support using Chris@0: // the YouTube API for uploading video, but here, we assume that this Chris@0: // particular module only supports playing YouTube video. Chris@0: 'type' => STREAM_WRAPPERS_READ_VISIBLE, Chris@0: ), Chris@0: ); Chris@0: }