Example #1
0
 /**
  * Sets the YAML specification version to use.
  *
  * @param string $version The YAML specification version
  *
  * @throws \InvalidArgumentException When version of YAML specs is not supported
  */
 public static function setSpecVersion($version)
 {
     if (!in_array($version, array('1.1', '1.2'))) {
         throw new \InvalidArgumentException(sprintf('Version %s of the YAML specifications is not supported', $version));
     }
     self::$spec = $version;
 }