> 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
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
> 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
> 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
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:
-
> > 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.
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
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!
-
8 matches
Mail list logo