eZPublishCommunityProject  2013.9
eZ\Publish\Core\Base\Configuration\Parser Interface Reference

Configuration Interfaces for configuration parser & writer. More...

+ Inheritance diagram for eZ\Publish\Core\Base\Configuration\Parser:

Public Member Functions

 __construct (array $settings)
 Construct an instance of Parser. More...
 
 parse ($fileName, $fileContent)
 Parse file and return raw configuration data. More...
 
 write ($fileName, array $configurationData)
 Store raw configuration data to file. More...
 

Detailed Description

Configuration Interfaces for configuration parser & writer.

Constructor & Destructor Documentation

eZ\Publish\Core\Base\Configuration\Parser::__construct ( array  $settings)

Construct an instance of Parser.

Parameters
array$settings

Implemented in eZ\Publish\Core\Base\Configuration\Parser\Ini.

Member Function Documentation

eZ\Publish\Core\Base\Configuration\Parser::parse (   $fileName,
  $fileContent 
)

Parse file and return raw configuration data.

Parameters
string$fileNameA valid file name
string$fileContent
Returns
array A plain array structure of configuration data where array clearing is marked with Configuration::TEMP_INI_UNSET_VAR and php variables are plain php values(numbers, floats, true and false). In addition strings are rtrimmed to avoid common user mistakes when dealing with configuration data (trailing whitespace). eg (ini example): [section] list[] list[]=item list[]=false

var=true num=2 float=1.2 string=1,5

Result: array( 'section' => array( 'list' => array( 'UNSET', 'item', false, ), 'var' => true, 'num' => 2, 'float' => 1.2, 'string' => '1,5', ) )

Todo:
Define exceptions

Implemented in eZ\Publish\Core\Base\Configuration\Parser\Ini.

eZ\Publish\Core\Base\Configuration\Parser::write (   $fileName,
array  $configurationData 
)

Store raw configuration data to file.

See Also
parse() For $configurationData definition
Parameters
string$fileNameA valid file name, will be overwritten if it exists
array$configurationData
Todo:
Define exceptions

Implemented in eZ\Publish\Core\Base\Configuration\Parser\Ini.


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