class DummyStreamWrapper
Same name in other branches
- 9 core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php \Drupal\file_test\StreamWrapper\DummyStreamWrapper
- 8.9.x core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php \Drupal\file_test\StreamWrapper\DummyStreamWrapper
- 10 core/modules/file/tests/file_test/src/StreamWrapper/DummyStreamWrapper.php \Drupal\file_test\StreamWrapper\DummyStreamWrapper
Helper class for testing the stream wrapper registry.
Dummy stream wrapper implementation (dummy://).
Hierarchy
- class \Drupal\Core\StreamWrapper\LocalStream implements \Drupal\Core\StreamWrapper\StreamWrapperInterface
- class \Drupal\file_test\StreamWrapper\DummyStreamWrapper extends \Drupal\Core\StreamWrapper\LocalStream
Expanded class hierarchy of DummyStreamWrapper
1 file declares its use of DummyStreamWrapper
- ImageStyleCustomStreamWrappersTest.php in core/
modules/ image/ tests/ src/ Kernel/ ImageStyleCustomStreamWrappersTest.php
1 string reference to 'DummyStreamWrapper'
- file_test.services.yml in core/
modules/ file/ tests/ file_test/ file_test.services.yml - core/modules/file/tests/file_test/file_test.services.yml
1 service uses DummyStreamWrapper
- stream_wrapper.dummy in core/
modules/ file/ tests/ file_test/ file_test.services.yml - Drupal\file_test\StreamWrapper\DummyStreamWrapper
File
-
core/
modules/ file/ tests/ file_test/ src/ StreamWrapper/ DummyStreamWrapper.php, line 14
Namespace
Drupal\file_test\StreamWrapperView source
class DummyStreamWrapper extends LocalStream {
/**
* {@inheritdoc}
*/
public function getName() {
return t('Dummy files');
}
/**
* {@inheritdoc}
*/
public function getDescription() {
return t('Dummy wrapper for testing.');
}
public function getDirectoryPath() {
return \Drupal::getContainer()->getParameter('site.path') . '/files';
}
/**
* Override getInternalUri().
*
* Return a dummy path for testing.
*/
public function getInternalUri() {
return '/dummy/example.txt';
}
/**
* Override getExternalUrl().
*
* Return the HTML URI of a public file.
*/
public function getExternalUrl() {
return '/dummy/example.txt';
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.