You are here

system_stream_wrapper.module in System stream wrapper 7

File

system_stream_wrapper.module
View source
<?php

/**
 * Implements hook_stream_wrappers().
 */
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;
}