Common
[ class tree: Common ] [ index: Common ] [ all elements ]

Class: ConfigParser

Source Location: /common/Utils.php

Class Overview


Tools for configuration files parsing


Methods



Class Details

[line 110]
Tools for configuration files parsing



[ Top ]


Class Methods


method parseArray [line 117]

array parseArray( string $value)

Converts a comma-separated string to an array



Tags:

access:  public
static:  


Parameters:

string   $value  

[ Top ]

method parseObjectArray [line 143]

void parseObjectArray( Config $config, string $prefix, string $suffixes)

Converts a list of values taken from a configuration file to an array of objects

File structure example:

   scales.0.label = 1/2
   scales.0.value = 2
   scales.0.visible = false
   scales.1.label = 1/5
   scales.1.value = 5

Parameter $suffixes contains an array of possible suffixes (array('label','value','visible') in the example).




Tags:

access:  public
static:  


Parameters:

Config   $config   configuration
string   $prefix   prefix
string   $suffixes   possible suffixes

[ Top ]


Documentation generated on Wed, 6 Apr 2005 12:07:07 +0200 by phpDocumentor 1.3.0RC3