Posted by petethebloke@googlemail.com on 10/03/07 11:47
I'm not sure how to ask for what I want, so I can't find it on Google.
I'll explain.....
I have a class 'hanging' with a constructor:
class hanging{
function hanging(){
}
}
//and a class curtain
class curtain extends hanging{
function curtain(){
}
}
//and a blind
class blind extends hanging{
function blind(){
}
}
In the hanging constructor the object gets database info part of which
has an ID number for its type, so I want the constructor to have
something like....
function hanging(){
//blah blah
if ( type_ID is curtain ){
$this-> is a curtain object
}
//etc etc
}
But I don't know how. Any help would be appreciated.
Thanks
Pete
Navigation:
[Reply to this message]
|