Multiple source files for PHP classes

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mjseaden
Forum Contributor
Posts: 458
Joined: Wed Mar 17, 2004 5:49 am

Multiple source files for PHP classes

Post by mjseaden »

Hi,

I'm designing and implementing a series of PHP classes for my new site, some of which are beginning to get rather large and probably best sectioned off into separate source files.

It's easy to do this in C++, because you don't have to enclose both the declaration and implementation in the same source file, however I'm not sure you can do this in PHP.

Is there any way I can split the implementation of my class into different source files in a 'proper' way?

Many thanks
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

PHP class code is always inline. There's no splitting into headers and source as in C++ nor are there partial classes like in C#
Post Reply