You are here

function resource_init in D7 Media 6

Implementation of hook_init().

Registers core stream handlers for public and private files.

File

resource/resource.module, line 35
Resource API for Drupal, a replacement for files.

Code

function resource_init() {
  module_load_include('inc', 'resource', 'ResourceStreamWrapperManager');
  module_load_include('inc', 'resource', 'ResourceStreamWrapper');
  module_load_include('inc', 'resource', 'ResourcePublicStreamWrapper');
  module_load_include('inc', 'resource', 'ResourcePrivateStreamWrapper');
  $manager = ResourceStreamWrapperManager::singleton();
  $manager
    ->register('public', 'ResourcePublicStreamWrapper');
  $manager
    ->register('private', 'ResourcePrivateStreamWrapper');
}