From: Vsevolod (S. I. <si...@cs...> - 2003-12-19 22:26:16
|
Chris, Finally, an non-trivial question. :) I am implementing a hierarchy of objects, each of which owns an SPOPS object. (I tried to not separate them, inheriting my classes both from SPOPS and from my superclass, but the new() methods collided, and multiple inheritance is not a good idea anyway). So far this worked out well until I started using 'links_to'. Assume that MyPublisher and MyBook are my classes, SPOPS_Publisher and SPOPS_Book are SPOPS classes. Instances of MyPublisher refer to instances of SPOPS_Publisher, instances of MyBooks refer to instances of SPOPS_Books. The expected object behavior is this: $aMyPublisher->books produces an array of MyBooks. In actuality, $aMyPublisher->books produces an array of SPOPS_Books. Is it possible to generate the desired result without straining the framework too much? Looks like I can achieve this by mucking around in SPOPS::ClassFactory::DBI and providing some kind of callbacks within the get/add/remove functions, but I'd like to get an official word first. As for my previous question, > It should print out: > Can it before? no > Can it after? yes Precisely - I checked it. > I agree that they should both say 'yes' and I'll see about making that > happen. Thanks! Simon -- Simon (Vsevolod ILyushchenko) si...@cs... http://www.simonf.com America's business leaders simply don't want to think about complex technology issues - they want to think about golf. Microsoft promises them that. Andrew Grygus, www.aaxnet.com |