You are here

DummyRemoteStreamWrapper.php in Zircon Profile 8.0

File

core/modules/file/tests/file_test/src/StreamWrapper/DummyRemoteStreamWrapper.php
View source
<?php

/**
 * @file
 * Contains \Drupal\file_test\StreamWrapper\DummyRemoteStreamWrapper.
 */
namespace Drupal\file_test\StreamWrapper;

use Drupal\Core\StreamWrapper\PublicStream;

/**
 * Helper class for testing the stream wrapper registry.
 *
 * Dummy remote stream wrapper implementation (dummy-remote://).
 *
 * Basically just the public scheme but not returning a local file for realpath.
 */
class DummyRemoteStreamWrapper extends PublicStream {

  /**
   * {@inheritdoc}
   */
  public function getName() {
    return t('Dummy files (remote)');
  }

  /**
   * {@inheritdoc}
   */
  public function getDescription() {
    return t('Dummy wrapper for simpletest (remote).');
  }
  function realpath() {
    return FALSE;
  }

}

Classes

Namesort descending Description
DummyRemoteStreamWrapper Helper class for testing the stream wrapper registry.