Re: [PHP] configuration class - skeleton code for first OOP adventure

2003-10-09 Thread anders thoresson
Save yourself a lot of headache learn how to use PEAR and OOP all in one fell swoop by using PEAR::Config I've already had a look at it, but it's to big for me to get. Though learning by doing would be a better way. -- anders thoresson -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] configuration class - skeleton code for first OOP adventure

2003-10-09 Thread anders thoresson
This will not work. For example if you have: option1 = value; option2 = value2; then ereg_replace('value', 'changed', $contents); will make it: option1 = changed; option2 = changed2; My plan is to have "option1 = value;" as old value and "option1 = changed;" as new value. Not only the change va

Re: [PHP] configuration class - skeleton code for first OOP adventure

2003-10-08 Thread Burhan Khalid
anders thoresson wrote: My first larger project is growing out of control. I've spent some weeks reading OOP tutorials, and feel ready to make my first dive into a new programming style. One of the things that led me this way was the need for user configuration of my project. Therefor, I'll sta

Re: [PHP] configuration class - skeleton code for first OOP adventure

2003-10-08 Thread Marek Kilimajer
anders thoresson wrote: foreach ($changedValues as $changedValue) { $new_contents = ereg_replace($changedValue[old], $changedValue[new], $contents); $contents = $new_contents; } This will not work. For example if you have: option1 = value; option2 = value2; then ereg_repla

[PHP] configuration class - skeleton code for first OOP adventure

2003-10-08 Thread anders thoresson
Hi, My first larger project is growing out of control. I've spent some weeks reading OOP tutorials, and feel ready to make my first dive into a new programming style. One of the things that led me this way was the need for user configuration of my project. Therefor, I'll start with a class that