What about using serialize() and unserialize() to pass your object in as
a string?
Harvey.
Philip Arndt wrote:
> Thanks Tim & Steve,
>
> The only solution I came up with was:
>
> function safe_options(Object $options=null)
> {
> if ($options == null)
> {
> $options = new Object(); // Or whatever is required for this
> particular object.
> }
>
> return $options;
> }
>
> function do_something(Object $options=null)
> {
> $options = $this -> safe_options($options);
>
> // do something with options.
> }
>
> Sigh. I guess one day maybe you can pass a parameter that contains the
> default constructor for an object, but that day is not today!
>
> Thanks again!
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---