I'm attempting to mix a PHP REST framework (Recess) with an webapp building framework (VCL4PHP), they unfortunately like to name their classes the same. Cache, Application (probably others, but I gave up at Application). Are there namespaces in PHP or any way I can get around this without rewriting one or the other frameworks or am I SF'ed?
Asked
Active
Viewed 2,216 times
2
-
Unfortunately, I can't help you here, but what is SF'ed? – Thomas Owens May 05 '09 at 14:14
2 Answers
6
PHP 5.3 has namespaces, but PHP 5.3 is still under development and they wouldn't instantly solve your problems. For all practical instances you're going to have to drop one of the frameworks, unless you're planning on forking one of them so you can keep your custom classnames.

NSSec
- 4,431
- 1
- 27
- 29
-
heheh thanks for the good answer, little too early in the game to consider forking either of those! – Peter Turner May 05 '09 at 14:20
1
Namespaces for PHP will be introduced in PHP 5.3. Currently your best bet is to manually prefix the class names for each framework.

John Downey
- 13,854
- 5
- 37
- 33