Returning objects from a recursive function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have developed with PHP for roughly a year now but am just getting 
into using objects.  I know Java well and thus I understand objects, 
so I thought it would be easy to use in PHP but I seem to be having 
problems.  I am using a list of Category objects to build a 
BreadCrumbTrail for an online photo album (i.e. HOME >> Category1 >> 
Subcategory).  When I return my BreadCrumbTrail object from a 
regular function, I can access it just fine.  However, when I return 
it from my recursive function, which queries the database and works 
backwards from deepest most subcategory all the way back to the HOME 
link, I keep getting "Call to a member function on a non-object" 
whenever I try to access any method or property of the object 
returned from the recursive function.  This is my theory, anyway, 
after all the testing I've done.  Viewing my code would probably 
help the most but then I would also have to explain the structure of 
my database too.  I thought maybe someone could help me if they've 
ever run into this problem.  Has anyone tried to return an object 
from a recursive function and able to access all of the object's 
methods and properties?  Look forward to any help I can get.  Thank 
you.

Rachel




------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux