On Wed, 21 Mar 2001, Fredrik Ohrn wrote:

> 
> I'm about to properly implement cpdf_set_viewer_preferences which is
> currently just a stub.
> 
> The underlying function takes a struct with 8 fields.
> 
> I'd like to avoid having to specify 8 parameters to the PHP equivalent
> (especially as most of them has sensible defaults).
> 
> How are structs 'emulated' in other places?
> 
>

You have a couple of options...

First of all are you sure that the user needs to specify all 8 fields of
the structure, or can you safely fill in some of them?

As a second option you could have the user pass an associative array which
is the closed equivalent of a structure in php.

-Sterling


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to