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

Class: Config_Container_IniFile

Source Location: /Config-0.3.1/Config/Container/IniFile.php

Class Overview

Config_Container
   |
   --Config_Container_IniFile

Config-API-Implemtentation for Ini-Files


Author(s):

Version:

  • $Id: IniFile.php,v 1.4 2001/12/11 19:45:37 sebastian Exp $

Variables

Methods


Inherited Variables

Inherited Methods

Class: Config_Container

Config_Container::getBlocks()
returns the name of all childblocks
Config_Container::getValue()
returns the value of the key in the given block
Config_Container::getValues()
returns all key-value-pairs of the given block
Config_Container::parseInput()
parses the input of the given data source
Config_Container::setFeatures()
Imports the requested datafields as object variables if allowed
Config_Container::setValue()
sets the value of the key in the given block
Config_Container::writeInput()
writes the data to the given data source or if not given to the datasource of parseInput

Class Details

[line 33]
Config-API-Implemtentation for Ini-Files

This class implements the Config-API based on ConfigDefault



[ Top ]


Class Variables

$feature = array()

[line 40]

contains the features given by parseInput

Type:   array


[ Top ]



Method Detail

parseInput   [line 55]

mixed parseInput( [string $datasrc = ""], [array $feature = array( "cc" => ";")])

parses the input of the given data source

The Data Source can be a string with the file or a array of strings with the files to read, so datasrc requires a existing file. The feature-array have to contain the comment char array("cc" => Comment char)

  • Return: returns a PEAR_ERROR, if error occurs
  • Access: public

Overrides Config_Container::parseInput() (parses the input of the given data source)

Parameters:

string   $datasrc     Name of the datasource to parse
array   $feature     Contains a hash of features

[ Top ]

writeInput   [line 178]

object PEAR_Error writeInput( [string $datasrc = ""], [boolean $preserve = true])

writes the data to the given data source or if not given to the datasource of parseInput If $datasrc was a array, the last file will used.

See parseInput for $datasrc. If the second argument $preserve is true, the implementation should try to preserve the original format and data of the source except changed or added values. This mean to preserve for example comments in files or so.


Overrides Config_Container::writeInput() (writes the data to the given data source or if not given to the datasource of parseInput)

Parameters:

string   $datasrc     Name of the datasource to parse
boolean   $preserve     preserving behavior

[ Top ]


Documentation generated on Fri, 30 Apr 2004 21:21:35 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.