JOOMLA中国
  • Joomla中国首页
  • 社区
  • 教程
  • 应用市场
  • B计划
Joomla! Framework TM
  • Namespace
  • Class
  • Tree
  • Deprecated

Namespaces

  • Composer
    • Autoload
  • Joomla
    • Application
      • Cli
        • Output
          • Processor
      • Web
    • Data
    • DI
      • Exception
    • Event
    • Filter
    • Input
    • Ldap
    • Registry
      • Format
    • Session
      • Storage
    • String
    • Uri
    • Utilities
  • None
  • PasswordCompat
    • binary
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Yaml
        • Exception
    • Polyfill
      • Util

Classes

  • Dumper
  • Inline
  • Parser
  • Yaml

Class Parser

Parser parses YAML strings to convert them to PHP arrays.

Namespace: Symfony\Component\Yaml
Author: Fabien Potencier <fabien@symfony.com>
Located at vendor/symfony/yaml/Parser.php

Methods summary

public
# __construct( integer $offset = 0, integer|null $totalNumberOfLines = null, array $skippedLineNumbers = array() )

Constructor.

Constructor.

Parameters

$offset
integer - $offset The offset of YAML document (used for line numbers in error messages)
$totalNumberOfLines
integer|null - $totalNumberOfLines The overall number of lines being parsed
$skippedLineNumbers
int[] - $skippedLineNumbers Number of comment lines that have been skipped by the parser
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
string - $value A YAML string
$exceptionOnInvalidType
boolean - $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
$objectSupport
boolean - $objectSupport true if object support is enabled, false otherwise
$objectForMap
boolean - $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

Magic methods summary

Constants summary

string BLOCK_SCALAR_HEADER_PATTERN '(?P<separator>\||>)(?P<modifiers>\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P<comments> +#.*)?'
#
string FOLDED_SCALAR_PATTERN Symfony\Component\Yaml\Parser::BLOCK_SCALAR_HEADER_PATTERN
#
Joomla! Framework TM API documentation generated by ApiGen 2.8.0
Joomla!® and Joomla! Framework™ are trademarks of Open Source Matters, Inc. in the United States and other countries.