Re: [PHP] optional object arguments to a function

2010-02-14 Thread Michael A. Peters
Shawn McKenzie wrote: Michael A. Peters wrote: Rene Veerman wrote: On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters wrote: How do I specify a default null object, or otherwise make the argument argument optional? To my knowledge: can't be done. But you can check any args through the func

Re: [PHP] optional object arguments to a function

2010-02-14 Thread Shawn McKenzie
Nathan Rixham wrote: > Shawn McKenzie wrote: >> Michael A. Peters wrote: >>> Rene Veerman wrote: On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters wrote: > How do I specify a default null object, or otherwise make the argument > argument optional? > To my knowledge: can

Re: [PHP] optional object arguments to a function

2010-02-14 Thread Nathan Rixham
Shawn McKenzie wrote: > Michael A. Peters wrote: >> Rene Veerman wrote: >>> On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters >>> wrote: How do I specify a default null object, or otherwise make the argument argument optional? >>> To my knowledge: can't be done. >>> >>> But you can

Re: [PHP] optional object arguments to a function

2010-02-14 Thread Shawn McKenzie
Michael A. Peters wrote: > Rene Veerman wrote: >> On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters >> wrote: >>> How do I specify a default null object, or otherwise make the argument >>> argument optional? >>> >> To my knowledge: can't be done. >> >> But you can check any args through the func_

Re: [PHP] optional object arguments to a function

2010-02-13 Thread Michael A. Peters
Rene Veerman wrote: On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters wrote: How do I specify a default null object, or otherwise make the argument argument optional? To my knowledge: can't be done. But you can check any args through the func_get_arg*() functions, then per-parameter push 'm

Re: [PHP] optional object arguments to a function

2010-02-13 Thread Rene Veerman
On Sat, Feb 13, 2010 at 9:05 AM, Michael A. Peters wrote: > How do I specify a default null object, or otherwise make the argument > argument optional? > To my knowledge: can't be done. But you can check any args through the func_get_arg*() functions, then per-parameter push 'm through a check fu

Re: [PHP] optional object arguments to a function

2010-02-13 Thread Jochem Maas
Op 2/13/10 8:59 PM, Richard Quadling schreef: > On 13 February 2010 10:07, Jochem Maas wrote: ... >> > > Try stdClass. I guess you didn't read what I wrote then. > If you know the class type, then that can be the type hint. > > You can also use func_get_args() to read all the parameters and

Re: [PHP] optional object arguments to a function

2010-02-13 Thread Richard Quadling
On 13 February 2010 10:07, Jochem Maas wrote: > Op 2/13/10 8:05 AM, Michael A. Peters schreef: >> I've started working on a class using DOMDocument to assemble MathML in >> php. The class, assuming I actually succeed, will eventually be used for >> parsing LaTeX math equations to MathML without th

Re: [PHP] optional object arguments to a function

2010-02-13 Thread Jochem Maas
Op 2/13/10 8:05 AM, Michael A. Peters schreef: > I've started working on a class using DOMDocument to assemble MathML in > php. The class, assuming I actually succeed, will eventually be used for > parsing LaTeX math equations to MathML without the need to have TeX > installed. I probably won't be