Thread: Classes in PHP
View Single Post
Old May 10th, 2007, 5:11 PM   #1
kruptof
Professional Programmer
 
kruptof's Avatar
 
Join Date: May 2006
Location: UK - London
Posts: 329
Rep Power: 3 kruptof is on a distinguished road
Classes in PHP

Can anybody tell how to separate the class specification from the class definition in PHP?

For example in c++ you write the name of the class along with it's data members and prototypes of the class's methods and then you define the methods in a different file and just includes the class specification in that file.

how do you do this in PHP, i can write the class with all the methods and data members inside the class but it just gets too long and looks really messy, is there a way to separate them.
__________________
Quote:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
kruptof is offline   Reply With Quote