Re: [PHP] Mixing classes

2004-10-20 Thread Tomi Kaistila
Great! Really, if your purpose was to be helpful, you failed miserably. The helpful part would have been that you would've actually hinted as into _how_ it was possible. I'm not looking for ready solutions or ready scripts, but with messages like these you really only waste other peoples' time.

Re: [PHP] Mixing classes

2004-10-20 Thread Greg Donald
On Wed, 20 Oct 2004 13:41:16 +0300, Tomi Kaistila [EMAIL PROTECTED] wrote: Really, if your purpose was to be helpful, you failed miserably. The helpful part would have been that you would've actually hinted as into _how_ it was possible. I'm not looking for ready solutions or ready scripts,

Re: [PHP] Mixing classes

2004-10-20 Thread Bruno B B Magalhães
Hi Tomy, I did the same thing! I´ve used a class called framework to encapsulate everything... here is what looks like: framework.inc.php ?php /** * Project: BBBM Framework * File: framework.inc.php * * @desc Main Framework Include * @link http://www.bbbm.com.br/ * @copyright 2004 Bruno B B

Re: [PHP] Mixing classes

2004-10-20 Thread Bruno B B Magalhães
Hi Tomy, I did the same thing! I´ve used a class called framework to encapsulate everything... here is what looks like: framework.inc.php ?php /** * Project: BBBM Framework * File: framework.inc.php * * @desc Main Framework Include * @link http://www.bbbm.com.br/ * @copyright 2004 Bruno B B

Re: [PHP] Mixing classes

2004-10-20 Thread Tomi Kaistila
Hi all! I finally got what I was after, after numerous tips and suggestion. Thank you for your patience. Special thanks to Bruno Magalhães, Thomas Goyne, and Davy Obdam. Thanks again :-) -- developer programmer me tomi kaistila home http://www.datamike.org gnupg 0xFA63E4C7 -- PHP General

Re: [PHP] Mixing classes

2004-10-19 Thread Davy Obdam
Hi Tomi, You could create an object of the Database class in your Auth class like this and then use your Datebase class with your Auth class: ?php require_once(Database/Database.php); class Auth { var $dbObject = ; function Auth () { //Create an instance of you database class

Re: [PHP] Mixing classes

2004-10-19 Thread Tomi Kaistila
Hi! Thanks for the idea, hadn't actually thought of it that way. I had thought of passing objects (instance the db object to the auth object) by reference, but when thinking that while one class might only need the help of one other class, another class might need the help of four classes.

Re: [PHP] Mixing classes

2004-10-19 Thread Davy Obdam
Hi Maybe you could make most class childs of the Core class... well at least the classes that need values from you config file. class Database extends Core { } } I dont know if this is gonna work in your set up, but since this Core class reads the config file, now you can just creat an

Re: [PHP] Mixing classes

2004-10-19 Thread Tomi Kaistila
Hi! A good idea, which I have used for some classes, like the Journal class (error handling) which fits in with the Core class. Unfortunantly I have too many classes to make them all into a chain of child classes. And also I have an ambition to write these classes in sorta seperate tools,

Re: [PHP] Mixing classes

2004-10-19 Thread Thomas Goyne
On Wed, 20 Oct 2004 08:09:53 +0300, Tomi Kaistila [EMAIL PROTECTED] wrote: Hi! A good idea, which I have used for some classes, like the Journal class (error handling) which fits in with the Core class. Unfortunantly I have too many classes to make them all into a chain of child classes.

Re: [PHP] Mixing classes

2004-10-19 Thread M. Sokolewicz
Thomas Goyne wrote: On Wed, 20 Oct 2004 08:09:53 +0300, Tomi Kaistila [EMAIL PROTECTED] wrote: Hi! A good idea, which I have used for some classes, like the Journal class (error handling) which fits in with the Core class. Unfortunantly I have too many classes to make them all into a chain

[PHP] Mixing classes

2004-10-18 Thread Tomi Kaistila
Hey! I've written several general classes, much as tools. One manages databases, one authenticates users, etc. I'm trying to bring all of these together into one sorta like a CMS, but the problem is that I can't find a way to have the different classes take advantage of each other; for

Re: [PHP] Mixing classes

2004-10-18 Thread Dan Joseph
I've written several general classes, much as tools. One manages databases, one authenticates users, etc. I'm trying to bring all of these together into one sorta like a CMS, but the problem is that I can't find a way to have the different classes take advantage of each other; for example, a

Re: [PHP] Mixing classes

2004-10-18 Thread Tomi Kaistila
What about extending the classes? Have you thought about something along those lines? Yes, it has crossed my mind. And I've done so, but to keep a class clean it's not a good idea to extend them indefinantly and extending a class with another class that really has nothing to do with the

Re: [PHP] Mixing classes

2004-10-18 Thread Tomi Kaistila
What about extending the classes? Have you thought about something along those lines? Yes, it has crossed my mind. And I've done so, but to keep a class clean it's not a good idea to extend them indefinantly and extending a class with another class that really has nothing to do with the