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

Class: Config_Container_phpIniFile

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

Class Overview

Config_Container
   |
   --Config_Container_phpIniFile

Config-API-Implemtentation for Ini-Files using parse_ini_file


Author(s):

Version:

  • $Id: phpIniFile.php,v 1.3 2002/06/18 06:47:41 alan_k 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 37]
Config-API-Implemtentation for Ini-Files using parse_ini_file

Note this is faster than the IniFile container, however there are a number of restrictions : like file size etc. see http://www.php.net/parse_ini_file for more details

This class implements the Config-API based on ConfigDefault

  • Version: $Id: phpIniFile.php,v 1.3 2002/06/18 06:47:41 alan_k Exp $
  • Access: public
  • Author: Alan Knowles <mailto:alan@akbkhome.com>


[ Top ]


Class Variables

$feature = array()

[line 44]

contains the features given by parseInput

Type:   array


[ Top ]



Method Detail

parseInput   [line 59]

mixed parseInput( [string $datasrc = ""], [array $feature = array( "realm" => "/")])

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 has to contain the realm (default = '/') eg. array("realm" => '/base/of/config/')

  • 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 107]

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

Relay for writeInput in Config_Container_IniFile::writeInput(); uses the wonderfull trick of $this being inherited on static method calls

See Documentation for the IniFile Container for more details


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:36 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.