Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /www/gimpster.com/php/phpweather/base_object.php
PHP Weather - PHP Weather

base_object

base_object

Provides some basic capabilities like error-handling and handling of defaults.

 

private class base_object

Provides some basic capabilities like error-handling and handling of defaults.
This class handles various messages. By using this class, you'llget a set of standard methods to generate messenges. You can makeerror-messages, notices and print debug-information.

AuthorsMartin Geisler <gimpster@gimpster.com>
Versionbase_object.html,v 1.6 2001/06/27 11:35:43 gimpster Exp

 
Direct known subclasses: db_layer, locale_common, db_common

Public Method Summary

void

base_object(array $input)

Sets up the properties by overriding the defaults with the actual input.

Private Method Summary

void

error(string $msg)

Prints an error-message.
void

debug(string $msg)

Prints a notice.
void

print_properties()

Prints properties.

Private Field Summary

array

$properties

All the objects properties are stored in this array.
string

$version

The version.

Public Method Details

base_object

public void base_object( array $input )

  Sets up the properties by overriding the defaults with the actual input.
First it includes the file 'defaults-dist.php'. Next it includes 'defaults.php'. You should place your local customizations in that file, since it will never be overridden. Finally it runs through $input and overrides the properties defined there.

Parameter
array $input
initial properties of the object
Returns void

See Also $properties

Private Method Details

error

private void error( string $msg )

  Prints an error-message.
You should supply it with a string as the argument, and it willthen print the string, prefixed with the word 'Error' in bold.

Parameter
string $msg
error-message.
Returns void


debug

private void debug( string $msg )

  Prints a notice.
You should supply it with a string as the argument, and it willthen print the string, prefixed with the word 'Debug' in bold.

Parameter
string $msg
notice.
Returns void


print_properties

private void print_properties( )

  Prints properties.
This method prints all the properties, of this object. It is onlyused as a tool for debugging.

Returns void


Private Field Details

$properties

private array $properties

>>array()<<

All the objects properties are stored in this array.


$version

private string $version

>><<

The version.



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta