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

Class: Config_File

Source Location: /PhpDocumentor-1.2.0beta2/phpDocumentor/Smarty/Config_File.class.php

Class Overview


Config_File class.


Author(s):

Version:

  • 2.0.1

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 40]
Config_File class.

Copyright: 2001,2002 ispi of Lincoln, Inc.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

You may contact the author of Config_File by e-mail at: andrei@php.net

Or, write to: Andrei Zmievski Software Engineer, ispi 237 S. 70th suite 220 Lincoln, NE 68510

The latest version of Config_File can be obtained from: http://www.phpinsider.com



[ Top ]


Class Variables

$booleanize =    true

[line 55]

Controls whether config values of on/true/yes and off/false/no get converted to boolean values automatically.
  • Access: public

Type:   mixed


[ Top ]

$overwrite =    true

[line 47]

Controls whether variables with the same name overwrite each other.
  • Access: public

Type:   mixed


[ Top ]

$read_hidden =    true

[line 62]

Controls whether hidden config sections/vars are read from the file.
  • Access: public

Type:   mixed


[ Top ]



Method Detail

Config_File (Constructor)   [line 76]

Config_File Config_File( [string $config_path = NULL])

Constructs a new config file class.
  • Access: public

Parameters:

string   $config_path     (optional) path to the config files

[ Top ]

clear   [line 219]

void clear( [string $file_name = NULL])

Clear loaded config data for a certain file or all files.
  • Access: public

Parameters:

string   $file_name     file to clear config data for

[ Top ]

get   [line 116]

mixed &get( string $file_name, [string $section_name = NULL], [string $var_name = NULL])

Retrieves config info based on the file, section, and variable name.
  • Return: a value or array of values
  • Access: public

Parameters:

string   $file_name     config file to get info for
string   $section_name     (optional) section to get info for
string   $var_name     (optional) variable to get info for

[ Top ]

get_file_names   [line 163]

array get_file_names( )

Get all loaded config file names.
  • Return: an array of loaded config file names
  • Access: public

[ Top ]

get_key   [line 150]

mixed &get_key( mixed $config_key, string $file_name)

Retrieves config info based on the key.
  • Return: a value or array of values
  • Access: public

Parameters:

string   $file_name     config key (filename/section/var)

[ Top ]

get_section_names   [line 176]

array get_section_names( string $file_name)

Get all section names from a loaded file.
  • Return: an array of section names from the specified file
  • Access: public

Parameters:

string   $file_name     config file to get section names from

[ Top ]

get_var_names   [line 196]

array get_var_names( string $file_name, [mixed $section = NULL], string $section_name)

Get all global or section variable names.
  • Return: an array of variables names from the specified file/section
  • Access: public

Parameters:

string   $file_name     config file to get info for
string   $section_name     (optional) section to get info for

[ Top ]

load_file   [line 235]

void load_file( string $file_name, [$prepend_path $prepend_path = true])

Load a configuration file manually.
  • Access: public

Parameters:

string   $file_name     file name to load
$prepend_path   $prepend_path     whether current config path should be prepended to the filename

[ Top ]

set_path   [line 94]

void set_path( string $config_path)

Set the path where configuration files can be found.
  • Access: public

Parameters:

string   $config_path     path to the config files

[ Top ]


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