Hi, I am currently working on transforming a rather large software package to oop. I do have a few years of experience with php, but just started to use oop. One of the first question that arose was how to handle configuration vars. These should ideally be stored in a file:
<?php $db_user = "user"; $db_password ="secret"; etc. ?> Now, I have to access these vars from a class. class database { var $db_user; var $db_password; function connect() { } } What is the best way to access these variables? I want to avoid global vars. I also don't like to set the vars using $object->db_user = $db_user; every time I use it. Also, is there any large open-source php - application which could serve as an example of best practice? best regards, Raul -- +++ GMX - Mail, Messaging & more http://www.gmx.net +++ Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php