Re[2]: [PEAR-DEV] "Namespace polution" in includes
| From: | Nicolas Hoizey | Date: | Fri, 18 Jan 2002 18:19:14 +0000 |
| Subject: | Re[2]: [PEAR-DEV] "Namespace polution" in includes | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3991@lists.php.net to get a copy of this message | ||
Hi all,
> Anyway here I put a list of possible solutions:
> 1) PHP "filespaces"
> 2) Change PEAR path
> 3) Use a PEAR constant and fixed paths
> 4) Invent our "require_pear" function.
I think we could use both the second and the third solutions.
We set a constant '_PEAR_LOCATION' which gives the relative path from
the include_path to the pear directory, and in all code, we use :
<?php
require _PEAR_LOCATION.'/PEAR.php';
?>
So, we can put an empty string by default, and anybody can change it.
See what I mean ?
Nicolas.
--
Nicolas "Brush" HOIZEY
Free PHP projects http://www.phpheaven.net
Veille tous azimuts http://www.gasteroprod.com
Clever Age http://www.clever-age.com