Results 1 to 5 of 5
May 8, 2005, 01:27 #1
- Join Date
- Feb 2004
- 0 Post(s)
- 0 Thread(s)
Have I correctly understood Object Interfaces?
moving from PHP4 to PHP5 and getting familiar with the new Object Model.
I was wondering a little something about Object Interfaces.
When you implement an Interface, you must implement all the methods in the Interface as well, if not a fatal error will be issued.
What seems strange to me is that you don't define at all what the methods do. Then what's the use of implementing them? Is that just to force a set of classes to share the same methods?
I can't get the idea behind Interfaces at the moment.... I'm sure it will seem bright as a blue sky in a few days but today I don't get it.
Does anyone feel like enlighting me?