Interim commit.
[yaffs-website] / web / modules / contrib / video / src / StreamWrapper / FacebookStream.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\video\StreamWrapper\FacebookStream.
6  */
7
8 namespace Drupal\video\StreamWrapper;
9
10 use Drupal\Core\StreamWrapper\ReadOnlyStream;
11 use Drupal\Core\StreamWrapper\StreamWrapperInterface;
12
13 /**
14  * Defines a Facebook (facebook://) stream wrapper class.
15  */
16 class FacebookStream extends VideoRemoteStreamWrapper {
17   
18   protected static $base_url = 'https://www.facebook.com/video.php?v=';
19   
20   /**
21    * {@inheritdoc}
22    */
23   public function getName() {
24     return t('Facebook');
25   }
26
27   /**
28    * {@inheritdoc}
29    */
30   public function getDescription() {
31     return t('Video served by the Facebook services.');
32   }
33   
34   /**
35    * {@inheritdoc}
36    */
37   public static function baseUrl() {
38     return self::$base_url;
39   }
40 }