Further modules included.
[yaffs-website] / web / modules / contrib / libraries / src / StreamWrapper / PhpFileLibrariesStream.php
1 <?php
2
3 namespace Drupal\libraries\StreamWrapper;
4
5 use Drupal\Core\StreamWrapper\LocalStream;
6
7 /**
8  * Provides a stream wrapper for PHP file libraries.
9  *
10  * Can be used with the 'php-file://' scheme, for example
11  * 'php-file-library://guzzle/src/functions_include.php'.
12  */
13 class PhpFileLibrariesStream extends LocalStream {
14
15   use LocalHiddenStreamTrait;
16   use PrivateStreamTrait;
17
18   /**
19    * {@inheritdoc}
20    */
21   public function getName() {
22     return t('PHP library files');
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   public function getDescription() {
29     return t('Provides access to PHP library files.');
30   }
31
32   /**
33    * {@inheritdoc}
34    */
35   public function getDirectoryPath() {
36     // @todo Provide support for site-specific directories, etc.
37     return 'sites/all/libraries';
38   }
39
40 }