At 01:51 09/04/2002, brad lafountain wrote:
>But do you see my point that having ONLY aggregate means that in 90% of the
>case where people will use it its probally a bad idea. They are only using it
>becuase of the lack of MI. How does aggregation solve overwriting methods.
Yes, I see the point...
>but i still don't like this... there are cleaner ways around that by using
>members and/or MI.
I really don't know - as far as I know, aggregation is really not about
runtime, but about 'has a', vs. 'is a'. When you have 'hard' compiling,
i.e., a phase that turns source code into a binary component, aggregation
helps keep a loose relationship between objects, but it's still done in
compile time of the new, 'derived' or constructed class:
class aggregated_class {
var $inner_object;
function aggergated_class()
{
$this->inner_object = new inner_class();
}
function inner_method()
{
return $this->inner_object->inner_method();
}
}
Zeev
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php