I'm currently working on a project which contains many classes. Each class is written in a separate file. Each file which I work on has included classes in it. Some classes rely on others and those classes also include files. What I want to do is to stop receiving the "cannot redeclare class" error. Is there any way of doing this? (I can get rid of them, but I have to work out file dependencies and it's slooow).
I'm thinking along the lines of the C++ '#ifndef and #include' directives to stop multiple includes.
If this is not possible then, is there any way in which this can be done by writing a little code in PHP to check to see if the file has already been included by PHP and if so prevent it from being included again.
Please help, (otherwise I'll have to spend ages trying to code round the problem :-( )
"Let us smite the evil slime eating hordes who may befall us on our quest to be the ultimate programmers of the known universe!"