Re: [PHP] class packages

2004-09-08 Thread Alex Hogan
> You suggestion about the config file is interesting, but while I go and > re-read your post, I am wondering how you would avoid class name conflicts. I try to avoid using the same name for different classes. > Point and case, the only reason I am going after packages is because I have > a searc

Re: [PHP] class packages

2004-09-08 Thread Jed R. Brubaker
Alex, You suggestion about the config file is interesting, but while I go and re-read your post, I am wondering how you would avoid class name conflicts. Point and case, the only reason I am going after packages is because I have a search class that is used for something else, and I want to not

Re: [PHP] class packages

2004-09-08 Thread Alex Hogan
> Do you define the class?: > > class help.Search { > } No.., In your example you are defining the search class in the Help namespace, just like you would in ActionScript. I don't think you can do that in php. You would just use; class Search{ // do stuff here } You can extend the class us

Re: [PHP] class packages

2004-09-08 Thread Jim Grill
> As far as I can tell there is not an easy way yet to create packages in > PHP5. > > It seems the following is the best option: > include('classes/help/Search.inc'); > > // Inside Search.inc and in the same "package" > include('OtherClass.inc'); > include('AnotherClass.inc'); > > Is there a better

Re: [PHP] class packages

2004-09-08 Thread Jed R. Brubaker
Well, my OO experience comes from Java and ActionScript2.0, so there is compilation going on and classes get refered to as named that assume files (as you probably know). As I just added to my original post, I am also wondering about naming conventions: Quote: -

Re: [PHP] class packages

2004-09-08 Thread Alex Hogan
> > It seems the following is the best option: > > include('classes/help/Search.inc'); > > > > // Inside Search.inc and in the same "package" > > include('OtherClass.inc'); > > include('AnotherClass.inc'); > > > > Is there a better way? I do pretty much the same thing but with a config.php file.

Re: [PHP] class packages

2004-09-08 Thread Jason Davidson
Out of curiosity, how would you prefer it? the way you mentioend is basically how i do though. Jason "Jed R. Brubaker" <[EMAIL PROTECTED]> wrote: > > As far as I can tell there is not an easy way yet to create packages in > PHP5. > > It seems the following is the best option: > include('clas

[PHP] class packages

2004-09-08 Thread Jed R. Brubaker
As far as I can tell there is not an easy way yet to create packages in PHP5. It seems the following is the best option: include('classes/help/Search.inc'); // Inside Search.inc and in the same "package" include('OtherClass.inc'); include('AnotherClass.inc'); Is there a better way? Thanks! -