You are here

function system_stream_wrapper_stream_wrappers in System stream wrapper 7

Implements hook_stream_wrappers().

File

./system_stream_wrapper.module, line 6

Code

function system_stream_wrapper_stream_wrappers() {
  $wrappers['module'] = array(
    'name' => t('Module files'),
    'class' => 'ModuleSystemStreamWrapper',
    'description' => t('Local module files.'),
    'type' => STREAM_WRAPPERS_READ,
  );
  $wrappers['theme'] = array(
    'name' => t('Theme files'),
    'class' => 'ThemeSystemStreamWrapper',
    'description' => t('Local theme files.'),
    'type' => STREAM_WRAPPERS_READ,
  );
  $wrappers['profile'] = array(
    'name' => t('Profile files'),
    'class' => 'ProfileSystemStreamWrapper',
    'description' => t('Local profile files.'),
    'type' => STREAM_WRAPPERS_READ,
  );

  // Add optional support for libraries module.
  if (module_exists('libraries')) {
    $wrappers['library'] = array(
      'name' => t('Library files'),
      'class' => 'LibrarySystemStreamWrapper',
      'description' => t('Local library files.'),
      'type' => STREAM_WRAPPERS_READ,
    );
  }
  return $wrappers;
}