Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Test for Interface membership
July 28, 2005, 4:01 pm
rate this thread
For a concrete example: I am implementing a "node" (Node_if) interface
on database record representing objects (children of the abstract class
Data_class) that reflects that certain records have a parent-chld
relationship. (Others do not).
I'm generating a library Ordering_class that handles sorting operations
(i.e., users view a report of ordered objects and can move a specific
record up or down the listing with methods like
Ordering_class::move_up(Data_class $obj) ).
Naturally the ordering behavior of Node_if members will be different
than the ordering behavior of "flat" tables. (reordering behavior of
Node_if members will be restricted to siblings; reordering of
non-Node_if members can affect any member of the table)
Is there any way for Ordering_class::move_up(Data_class $obj) to test
$obj to determine that it is or is not a member of Node_if?
- » Question on best practice for allowing edits of lists
- — Previous thread in » PHP Scripting Forum