Re: [PHP] Calling parent function with call_user_func_array

2007-11-30 Thread Tommy Baggett
Thanks for the great advice! That did the trick and made me realize an even simpler solution to my needs in the process. I needed to iterate the pages in reverse to store the page ID of the last element of each element before allowing the walker class to do its work. This allowed me to

Re: [PHP] Calling parent function with call_user_func_array

2007-11-29 Thread Nathan Nobbe
On Nov 29, 2007 7:22 PM, Tommy Baggett <[EMAIL PROTECTED]> wrote: > Here's the exact code I tried: > > class Walker_NavBar extends Walker { > ... > >function walk($elements, $to_depth) { >$args = func_get_args(); > > ... > >// call base class implementation

Re: [PHP] Calling parent function with call_user_func_array

2007-11-29 Thread Tommy Baggett
On Nov 29, 2007, at 5:30 PM, Jochem Maas wrote: does this work:? call_user_func_array(array(parent,'doSomething'),$args); It doesn't work with PHP 4. I was going to try PHP5 on my development machine but I will need to do some configuration editing first. Here's the exact cod

Re: [PHP] Calling parent function with call_user_func_array

2007-11-29 Thread Jochem Maas
Tommy Baggett wrote: > Thanks for taking the time to reply. > > I'm working on a Wordpress theme and extending one of their existing > classes (the Walker class if you're familiar with WP). Since WP still > supports PHP4, my theme needs to as well. I know WP, don't like the code too much - but y

RE: [PHP] Calling parent function with call_user_func_array

2007-11-29 Thread Tommy Baggett
TED] Sent: Thursday, November 29, 2007 5:06 PM To: Tommy Baggett Cc: php-general@lists.php.net Subject: Re: [PHP] Calling parent function with call_user_func_array Tommy Baggett wrote: > I'm a self-confessed PHP newb (first step towards a cure, right?), so if these are your first steps

Re: [PHP] Calling parent function with call_user_func_array

2007-11-29 Thread Jochem Maas
Tommy Baggett wrote: > I'm a self-confessed PHP newb (first step towards a cure, right?), so if these are your first steps why use php4? php5 has been out for going on 3 years. > apologies in advance for what may be a basic question. I spent an hour > searching for an answer to this and couldn't