yamlEncode() public static method

Returns a string containing the YAML representation of $value.
public static yamlEncode ( array $value, integer $inline = 3 ) : string
$value array The value being encoded
$inline integer The level where you switch to inline YAML
return string
Beispiel #1
0
 /**
  * Puts content in a config file.
  *
  * @param string $file    Path to the file
  * @param mixed  $content Content for the file
  * @param int    $inline  The level where you switch to inline YAML
  *
  * @return bool TRUE on success, FALSE on failure
  */
 public static function putConfig($file, $content, $inline = 3)
 {
     return self::put($file, rex_string::yamlEncode($content, $inline));
 }