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

Class: Config

Source Location: /core/Config.php

Class Overview


Provides a Config abstraction in the form of a singleton


Variables

Methods



Class Details

[line 13]
Provides a Config abstraction in the form of a singleton



[ Top ]


Class Variables

static $_instances = array()

[line 15]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_config = array()

[line 16]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_config_name =  ''

[line 18]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_filename =  ''

[line 17]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


static method getDBConfig [line 119]

static void getDBConfig( $connection)



Tags:

access:  public


Parameters:

   $connection  

[ Top ]

static method getInstance [line 44]

static Config getInstance( [ $config_name = ''], string $filename)

Loads the config from an ini file into an array

To override the default just call Config::load('filename') with your custom config.




Tags:

access:  public


Parameters:

string   $filename  
   $config_name  

[ Top ]

constructor __construct [line 24]

Config __construct( $config_name)

Constructor is private so it can't be instantiated



Tags:

access:  protected


Parameters:

   $config_name  

[ Top ]

method getFilename [line 115]

void getFilename( )



Tags:

access:  public


[ Top ]

method save [line 62]

boolean save( [string $filename = ''])

Saves the config from the array file into an inifile

To override the default just call Config::save('filename') with your custom config.




Tags:

access:  public


Parameters:

string   $filename  

[ Top ]

method __get [line 93]

string __get( string $field)

Get a single value from the config

In the first call, it loads the config file




Tags:

todo:  Improve error reporting
access:  public


Parameters:

string   $field  

[ Top ]

method __isset [line 111]

void __isset( $field)



Tags:

access:  public


Parameters:

   $field  

[ Top ]

method __set [line 107]

void __set( $field $field, $value $value)

Set a single config value



Tags:

access:  public


Parameters:

$field   $field  
$value   $value  

[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:32:58 -0500 by phpDocumentor 1.4.3