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

Class: Phergie_Config

Source Location: /Phergie/Config.php

Class Overview


Reads from and writes to PHP configuration files and provides access to the settings they contain.


Author(s):

Implements interfaces:

  • ArrayAccess (internal interface)

Variables

Methods



Class Details

[line 32]
Reads from and writes to PHP configuration files and provides access to the settings they contain.



Tags:

author:  Phergie Development Team <team@phergie.org>
link:  http://pear.phergie.org/package/Phergie
license:  New BSD License


[ Top ]


Class Variables

$files = array()

[line 40]

Mapping of configuration file paths to an array of names of settings they contain



Tags:

access:  protected

Type:   array


[ Top ]

$settings = array()

[line 47]

Mapping of setting names to their current corresponding values



Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


method offsetExists [line 133]

bool offsetExists( string $offset)

Checks to see if a configuration setting is assigned a value.



Tags:

return:  TRUE if the setting has a value, FALSE otherwise
see:  ArrayAccess::offsetExists()
access:  public



Implementation of:
ArrayAccess::offsetExists

Parameters:

string   $offset   Configuration setting name

[ Top ]

method offsetGet [line 147]

mixed offsetGet( string $offset)

Returns the value of a configuration setting.



Tags:

return:  Configuration setting value or NULL if it is not assigned a value
see:  ArrayAccess::offsetGet()
access:  public



Implementation of:
ArrayAccess::offsetGet

Parameters:

string   $offset   Configuration setting name

[ Top ]

method offsetSet [line 167]

void offsetSet( string $offset, mixed $value)

Sets the value of a configuration setting.



Tags:

see:  ArrayAccess::offsetSet()
access:  public



Implementation of:
ArrayAccess::offsetSet

Parameters:

string   $offset   Configuration setting name
mixed   $value   New setting value

[ Top ]

method offsetUnset [line 180]

void offsetUnset( string $offset)

Removes the value set for a configuration setting.



Tags:

see:  ArrayAccess::offsetUnset()
access:  public



Implementation of:
ArrayAccess::offsetUnset

Parameters:

string   $offset   Configuration setting name

[ Top ]

method read [line 59]

Phergie_Config read( string $file)

Includes a specified PHP configuration file and incorporates its return value (which should be an associative array) into the current configuration settings.



Tags:

return:  Provides a fluent interface
throws:  Phergie_Config_Exception
access:  public


Parameters:

string   $file   Path to the file to read

[ Top ]

method readArray [line 98]

Phergie_Config readArray( $settings)

Merges an associative array of configuration setting values into the current configuration settings.



Tags:

return:  Provides a fluent interface
access:  public


Parameters:

array   $settings   Associative array of configuration setting values keyed by setting name

[ Top ]

method write [line 111]

Phergie_Config write( )

Writes the values of the current configuration settings back to their originating files.



Tags:

return:  Provides a fluent interface
access:  public


[ Top ]


Documentation generated on Mon, 27 Sep 2010 23:03:47 -0500 by phpDocumentor 1.4.3