yamlDecode() 공개 정적인 메소드

Parses YAML into a PHP array.
public static yamlDecode ( string $value ) : array
$value string YAML string
리턴 array
예제 #1
0
파일: file.php 프로젝트: staabm/redaxo
 /**
  * Returns the content of a config file.
  *
  * @param string $file    Path to the file
  * @param mixed  $default Default value
  *
  * @return mixed Content of the file or default value if the file isn't readable
  */
 public static function getConfig($file, $default = [])
 {
     $content = self::get($file);
     return $content === null ? $default : rex_string::yamlDecode($content);
 }