Version 1
[yaffs-website] / web / modules / contrib / video / src / StreamWrapper / VineStream.php
diff --git a/web/modules/contrib/video/src/StreamWrapper/VineStream.php b/web/modules/contrib/video/src/StreamWrapper/VineStream.php
new file mode 100644 (file)
index 0000000..c6f29b4
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\video\StreamWrapper\VineStream.
+ */
+
+namespace Drupal\video\StreamWrapper;
+
+use Drupal\Core\StreamWrapper\ReadOnlyStream;
+use Drupal\Core\StreamWrapper\StreamWrapperInterface;
+
+/**
+ * Defines a VineStream (vine://) stream wrapper class.
+ */
+class VineStream extends VideoRemoteStreamWrapper {
+  
+  protected static $base_url = 'https://vine.co/v';
+  
+  /**
+   * {@inheritdoc}
+   */
+  public function getName() {
+    return t('Vine');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getDescription() {
+    return t('Video served by the Vine services.');
+  }
+  
+  /**
+   * {@inheritdoc}
+   */
+  public static function baseUrl() {
+    return self::$base_url;
+  }
+}