XOOPS  2.6.0
Xoops\Core\Yaml Class Reference
Inheritance diagram for Xoops\Core\Yaml:
Inheritance graph

Static Public Member Functions

static dump ($var, $inline=4, $indent=4)
 
static dumpWrapped ($var, $inline=4, $indent=4)
 
static load ($yamlString)
 
static loadWrapped ($yamlString)
 
static read ($yamlFile)
 
static readWrapped ($yamlFile)
 
static save ($var, $yamlFile, $inline=4, $indent=4)
 
static saveWrapped ($var, $yamlFile, $inline=4, $indent=4)
 

Detailed Description

Definition at line 39 of file Yaml.php.

Member Function Documentation

static Xoops\Core\Yaml::dump (   $var,
  $inline = 4,
  $indent = 4 
)
static

Dump an PHP array as a YAML string

Parameters
mixed$varVariable which will be dumped
integer$inlineNesting level where you switch to inline YAML
integer$indentNumber of spaces to indent for nested nodes
Returns
string|bool YAML string or false on error

Definition at line 51 of file Yaml.php.

References $var, and Xoops\getInstance().

Here is the call graph for this function:

static Xoops\Core\Yaml::dumpWrapped (   $var,
  $inline = 4,
  $indent = 4 
)
static

Dump an PHP array as a YAML string with a php wrapper

The wrap is a php header that surrounds the yaml with section markers, '—' and '...' along with php comment markers. The php wrapper keeps the yaml file contents from being revealed by serving the file directly from a poorly configured server.

Parameters
mixed$varVariable which will be dumped
integer$inlineNesting level where you switch to inline YAML
integer$indentNumber of spaces to indent for nested nodes
Returns
string|boolean YAML string or false on error

Definition at line 135 of file Yaml.php.

References $var, and Xoops\getInstance().

Here is the call graph for this function:

static Xoops\Core\Yaml::load (   $yamlString)
static

Load a YAML string into a PHP array

Parameters
string$yamlStringYAML dump string
Returns
array|boolean PHP array or false on error

Definition at line 69 of file Yaml.php.

References Xoops\getInstance().

Here is the call graph for this function:

static Xoops\Core\Yaml::loadWrapped (   $yamlString)
static

Load a YAML string with a php wrapper into a PHP array

The wrap is a php header that surrounds the yaml with section markers, '—' and '...' along with php comment markers. The php wrapper keeps the yaml file contents from being revealed by serving the file directly from a poorly configured server.

Parameters
string$yamlStringYAML dump string
Returns
array|boolean PHP array or false on error

Definition at line 159 of file Yaml.php.

References Xoops\getInstance().

Here is the call graph for this function:

static Xoops\Core\Yaml::read (   $yamlFile)
static

Read a file containing YAML into a PHP array

Parameters
string$yamlFilefilename of YAML file
Returns
array|boolean PHP array or false on error

Definition at line 87 of file Yaml.php.

References Xoops\getInstance().

Referenced by Xmf\Database\TableLoad\loadTableFromYamlFile(), Xoops\Core\Assets\readAssetsPrefs(), and Xoops\Core\Service\Manager\readYamlProviderPrefs().

Here is the call graph for this function:

Here is the caller graph for this function:

static Xoops\Core\Yaml::readWrapped (   $yamlFile)
static

Read a file containing YAML with a php wrapper into a PHP array

The wrap is a php header that surrounds the yaml with section markers, '—' and '...' along with php comment markers. The php wrapper keeps the yaml file contents from being revealed by serving the file directly from a poorly configured server.

Parameters
string$yamlFilefilename of YAML file
Returns
array|boolean PHP array or false on error

Definition at line 185 of file Yaml.php.

References Xoops\getInstance().

Referenced by Xoops\Core\Cache\CacheManager\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:

static Xoops\Core\Yaml::save (   $var,
  $yamlFile,
  $inline = 4,
  $indent = 4 
)
static

Save a PHP array as a YAML file

Parameters
array$varvariable which will be dumped
string$yamlFilefilename of YAML file
integer$inlineNesting level where you switch to inline YAML
integer$indentNumber of spaces to indent for nested nodes
Returns
integer|boolean number of bytes written, or false on error

Definition at line 109 of file Yaml.php.

References $var, and Xoops\getInstance().

Referenced by Xoops\Core\Assets\saveAssetsPrefs(), and Xoops\Core\Service\Manager\saveProviderPrefs().

Here is the call graph for this function:

Here is the caller graph for this function:

static Xoops\Core\Yaml::saveWrapped (   $var,
  $yamlFile,
  $inline = 4,
  $indent = 4 
)
static

Save a PHP array as a YAML file with a php wrapper

The wrap is a php header that surrounds the yaml with section markers, '—' and '...' along with php comment markers. The php wrapper keeps the yaml file contents from being revealed by serving the file directly from a poorly configured server.

Parameters
array$varvariable which will be dumped
string$yamlFilefilename of YAML file
integer$inlineNesting level where you switch to inline YAML
integer$indentNumber of spaces to indent for nested nodes
Returns
integer|boolean number of bytes written, or false on error

Definition at line 212 of file Yaml.php.

References $var, and Xoops\getInstance().

Referenced by Xoops\Core\Cache\CacheManager\__construct(), and Xoops\Core\Cache\CacheManager\createDefaultConfig().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: