News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Vidyut Luther's Blog:
PHP Namespaces - Working with external teams and possibly frameworks
March 01, 2006 @ 07:04:27

Vidyut Luther has posted a new item on his blog today that presents a situation he's been given concerning namespaces.

I've run into an issue, or rather a friend of mine has. He asked me for advice, I gave it to him, but I'm curious how others would do this. The problem is this:

Team A, has been working on some code for a few months, Team A has a class called "SomeClass". Team B, is an "outsourced" team, who is writing a SOAP interface to Team A's code. Somehow, due to whatever reasons, Team A and Team B developers didn't talk.

Team B also created a class and called it "SomeClass". These classes are in files called "Aclass.class.php" and "Bclass.class.php" . There are some files, that include both files.. obviously, you end up with a "cannot redeclare class" fatal error.

Vidyut's suggestion was to just to change the class names. Unfortunately, this might not work if there is no communication between the two parties - they cannot come to a compromise on the naming.

He question to the community is "How do you handle an issue of single namespace, or rather no namespace ?"

0 comments voice your opinion now!
namespaces php6 external teams frameworks namespaces php6 external teams frameworks


blog comments powered by Disqus

Similar Posts

Andi Gutmans\' Blog: PHP is a great language!

Vidyut Luther\'s Blog: PHP Namespaces - Working with external teams and possibly frameworks

Justin Silverton\'s Blog: What would you like to see in PHP 6?

Till's Blog: Nginx+PHP+FastCGI: Testing your web application with bleeding edge PHP

Halls of Valhalla: From PHP 5 to 7


Community Events

Don't see your event here?
Let us know!


voicesoftheelephpant example language application configure framework podcast interview performance introduction conference library opinion php7 community symfony2 laravel release api series

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework