symfony API

sfYaml Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.0 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.0 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfYaml class.

Method Summary

  • string dump($array)
    Dump YAML from PHP array statically
  • echoln()
    Wraps echo to automatically provide a newline
  • getIncludeContents()
  • array load($input)
    Load YAML into a PHP array statically

Method Details

  • (string) dump ($array) Browse code

    $array PHP array

    Dump YAML from PHP array statically


    The dump method, when supplied with an array, will do its best
    to convert the array into friendly YAML.

  • echoln () Browse code

    Wraps echo to automatically provide a newline

  • getIncludeContents () Browse code

  • (array) load ($input) Browse code

    $input Path of YAML file or string containing YAML

    Load YAML into a PHP array statically


    The load method, when supplied with a YAML stream (string or file),
    will do its best to convert YAML in a file into a PHP array.

    Usage:

    $array = sfYAML::Load('config.yml');
    print_r($array);