Login   Register  
PHP Classes
elePHPant
Icontem

File: properties.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Daniel Jšnecke  >  PHP INI Class  >  properties.txt  >  Download  
File: properties.txt
Role: Documentation
Content type: text/plain
Description: Methods and properties of ini.class.php
Class: PHP INI Class
Handle ini files and defaults
Author: By
Last change: added defaults for properties
Date: 12 years ago
Size: 1,402 bytes
 

Contents

Class file image Download
ini.class.php

Methods and properties

I. Properties

	boolean parse_constants ( default: TRUE )
	
		if TRUE any value in an ini-file representing the name of a constant
		will replaced by that respective value.
		
	boolean use_defaults ( default: TRUE )
	
		determins if the setting of a defaults file should be used if a
		requested key is not set
		
II. Methods

	constructor ini ( [ string ini_file [, string default_file ] ] )
	
		the constructor is called when an instance of the class is created. The
		filenames for the ini-file and the default-file can be passed as 
		optional arguments; 
		
	mixed get ( string key [, string section ] )
	
		get the settings for the given <key> in the ini-file; if necessary the
		name of the section has to be given, too.
		
		if a value is found in the ini-file this is returned; else, if 
		<parse_constants> is TRUE and there is a setting for <key> in the 
		defaults-file, this is returned. Otherwise this method returns NULL.
		
	mixed read_ini ( string filename [, boolean return_ini ] )
	
		reads the ini-file given by <filename>. Returns FALSE if errors occur.
		Otherwise returns TRUE or, if <return_ini> is TRUE, returns the 
		settings as associative array. 
		
	boolean read_defaults ( string_filename )
	
		reads the file holding the default-settings. Returns TRUE in success,
		otherwise FALSE.