Re: Ques: Conflicting functions in two include files.
| From: | Robert Cummings | Date: | Fri, 23 Jan 2004 18:07:31 +0000 |
| Subject: | Re: Ques: Conflicting functions in two include files. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175556@lists.php.net to get a copy of this message | ||
On Fri, 2004-01-23 at 12:02, Chris Shiflett wrote:
> --- Al <news@ridersite.org> wrote:
> > I have a page that calls functions from two different include files.
> > Unfortunately, some of the functions have the same name; but are
> > slightly different.
> >
> > I know I can change the names of the conflicting functions; but, that
> > is a bit of a chore.
>
> I think this is exactly what you'll have to do. This is a direct result of
> the lack of namespacing in PHP, which is one of the valid complaints
> against it, although it does help to keep the syntax a bit simpler.
IMHO encapsulating functions in objects provides decent namespacing
functionality. I can't really see a large need beyond what classes
provide. True that then there's still an issue with class names, but
that's less frequent a collision.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'