Version 1
[yaffs-website] / vendor / drush / drush / lib / Drush / Make / Parser / ParserYaml.php
diff --git a/vendor/drush/drush/lib/Drush/Make/Parser/ParserYaml.php b/vendor/drush/drush/lib/Drush/Make/Parser/ParserYaml.php
new file mode 100644 (file)
index 0000000..2591619
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * @file
+ * Parser for YAML format.
+ */
+
+namespace Drush\Make\Parser;
+
+use Symfony\Component\Yaml\Yaml;
+
+class ParserYaml implements ParserInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function supportedFile($filename) {
+    $info = pathinfo($filename);
+    return isset($info['extension']) && $info['extension'] === 'yml';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function parse($data) {
+    return Yaml::parse($data);
+  }
+
+}