src/helpers/BaseYaml.php
/**
     * Encodes the given value into a Yaml string using the [[thamtech\yaml\Dumper]] extension.
     *
     * @param mixed $value the data to be encoded.
     *
     * @param thamtech\yaml\Dumper|array $dumper the dumper or configuration array
     *
     * @param int $inline The level where the dumper switches to inline YAML
     *
     * @param int $flags  A bit field of Symfony\Component\Yaml\Yaml::DUMP_*
     *     constants to customize the dumped YAML string
     *
     * @return string the encoding result.
     *
     * @throws InvalidArgumentException if there is any encoding error.
     */
Encodes the given value into a Yaml string using the [[thamtech\yaml\Dumper]] extension.
@param mixed $value the data to be encoded.

@param thamtech\yaml\Dumper|array $dumper the dumper or configuration array

@param int $inline The level where the dumper switches to inline YAML

@param int $flags  A bit field of Symfony\Component\Yaml\Yaml::DUMP_
constants to customize the dumped YAML string

@return string the encoding result.

@throws InvalidArgumentException if there is any encoding error.
Encodes the given value into a Yaml string using the [[ thamtech \ yaml \ Dumper ]] extension . @param mixed $value the data to be encoded . @param thamtech \ yaml \ Dumper|array $dumper the dumper or configuration array @param int $inline The level where the dumper switches to inline YAML @param int $flags A bit field of Symfony \ Component \ Yaml \ Yaml :: DUMP_ constants to customize the dumped YAML string @return string the encoding result . @throws InvalidArgumentException if there is any encoding error .
public static function encode($value, $dumper = [], $inline = 2, $flags = 0)
    {
        static::ensureDumperDefined();
        $dumper = Instance::ensure($dumper, Dumper::class);
        $yaml = $dumper->dump($value, $inline, 0, $flags);
        return $yaml;
    }
public static function encode ( $ value , $ dumper = [ ] , $ inline = 2 , $ flags = 0 ) { static :: ensureDumperDefined ( ) ; $ dumper = Instance :: ensure ( $ dumper , Dumper :: class ) ; $ yaml = $ dumper -> dump ( $ value , $ inline , 0 , $ flags ) ; return $ yaml ; }
Encodes the given value into a Yaml string using the [[thamtech\yaml\Dumper]] extension.
Encodes the given value into a Yaml string using the [[ thamtech \ yaml \ Dumper ]] extension .