|
Posted by Steve on 08/24/07 01:45
<burgermeister01@gmail.com> wrote in message
news:1187916107.291436.304670@q3g2000prf.googlegroups.com...
| First, let me say that this question is a rather general programming
| question, but the context is PHP, so I figured this group would have
| the most relevant insight.
since this is a general prog. q., let me answer with a formal approach...
i'd get more strict with the array. i'd make them into an object - a class.
i'd either have b extend a, or a and b extend another base/common object, or
have a and b implement a standard inter face. the array that you're holding
$object in should be strong-typed as the 1) base object or 2) the shared
interface. upon processing within your function, you'd simply get the class
type of the object and place it in its appropriate array.
but, that just may be to formal...especially since isp's seem reluctant/slow
in upgrading to more recent and oop compatible versions of php.
and, that could just be me.
cheers.
Navigation:
[Reply to this message]
|