OZONE Asylum
Forums
DHTML/Javascript
complex switch case
This page's ID:
27696
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
An interface can mean two things: a) an explicitly defined Interface ala java - which enforces your classes to conform to that interface. b) Just the visible members of any class, by name. So I can say $objectOfTypeA->DoFunkyStuff() and $objectOfTypeB->DoFunkyStuff(), because they 'just happen' to both have DoFunkyStuff Methods. Of course that's not enforced at all, and you won't know that the code will run before running it. But that's the way PHP does it (but php5 does have interfaces, I believe, but I didn't check), and it's way better than not being able to do this at all just to satisfy the compiler if ( objectIsTypeA) { (objectTypeA)someObject->DoFunkyStuff()} else { (objectTypeB)someObject->DoFunkyStuff()} to have a C++ like example... so long, ->Tyberius Prime
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »