Re: class packages

From: Date: Wed, 08 Sep 2004 15:20:38 +0000
Subject: Re: class packages
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-196136@lists.php.net to get a copy of this message
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 have to name my other class "SearchHelp". I am going to run into conflicts if I include two class definitions for search, am I not? Thanks again for all of the insight! "Alex Hogan" <hogana@gmail.com> wrote in message news:4b7a4285040908081049c0f6c0@mail.gmail.com... >> 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 using; > > class subSearch extends Search{ > // do stuff here > } > > > > alex hogan

« previous php.general (#196136) next »