As others have pointed out, what you want here is composition. Inheritance
is only meant to go one way: UP. Subclasses know about their superclasses,
but superclasses should really have no idea if there are subclasses or how
they are implemented.

On Thu, May 1, 2008 at 1:27 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

>
> I need to know if I can access the methods in a child object from its
> parent class and if so, how I might do that.
>
> I have a contentService object that is getting fairly full of
> functions, many having to do with images so I was thinking of creating
> a sub-class of content and call it imageService. What I have is a
> getImageGallerys() function and a getImageByGallery function(), among
> others. I plan to create a function that gets a single gallery from
> getImageGallerys(), then uses the gallery's id to retrieve its images
> from getImageByGallery() returning that query to the view.
>
> I guess I was thinking this function would be in the contentService
> object, but I suppose it should be in the imageService sub-class I
> will create. What are your guys thoughts on this, and can I access
> methods in a sub-class from a class?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to