Version 1
[yaffs-website] / vendor / drush / drush / lib / Drush / Make / Parser / ParserYaml.php
1 <?php
2
3 /**
4  * @file
5  * Parser for YAML format.
6  */
7
8 namespace Drush\Make\Parser;
9
10 use Symfony\Component\Yaml\Yaml;
11
12 class ParserYaml implements ParserInterface {
13
14   /**
15    * {@inheritdoc}
16    */
17   public static function supportedFile($filename) {
18     $info = pathinfo($filename);
19     return isset($info['extension']) && $info['extension'] === 'yml';
20   }
21
22   /**
23    * {@inheritdoc}
24    */
25   public static function parse($data) {
26     return Yaml::parse($data);
27   }
28
29 }