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;
 }
Example #2
0
 public static function enablePhpParsing()
 {
     self::$enablePhpParsing = true;
 }
Example #3
0
 public static function enablePhpParsing()
 {
     self::$enablePhpParsing = TRUE;
 }
Example #4
0
 /**
  * Sets the PHP support flag when parsing YAML files.
  *
  * Be warned that PHP support will be removed in Symfony 2.3.
  *
  * @param Boolean $boolean true if PHP parsing support is enabled, false otherwise
  *
  * @deprecated Deprecated since version 2.0, to be removed in 2.3.
  */
 public static function setPhpParsing($boolean)
 {
     self::$enablePhpParsing = (bool) $boolean;
 }