Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • Dumper
  • Escaper
  • Inline
  • Parser
  • Unescaper
  • Yaml
  • Overview
  • Namespace
  • Class
  • Tree

Class Parser

Parser parses YAML strings to convert them to PHP arrays.

Namespace: Symfony\Component\Yaml
Author: Fabien Potencier fabien@symfony.com
Located at Parser.php
Methods summary
public
# __construct( integer $offset = 0 )

Constructor.

Constructor.

Parameters

$offset
The offset of YAML document (used for line numbers in error messages)
public mixed
# parse( string $value, boolean $exceptionOnInvalidType = false, boolean $objectSupport = false, boolean $objectForMap = false )

Parses a YAML string to a PHP value.

Parses a YAML string to a PHP value.

Parameters

$value
A YAML string
$exceptionOnInvalidType
true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
$objectSupport
true if object support is enabled, false otherwise
$objectForMap
true if maps should return a stdClass instead of array()

Returns

mixed
A PHP value

Throws

Symfony\Component\Yaml\Exception\ParseException
If the YAML is not valid
Constants summary
string FOLDED_SCALAR_PATTERN
# '(?P<separator>\||>)(?P<modifiers>\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P<comments> +#.*)?'
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen