The new operator works fine for builtin functions. Look at the domxml
extension (INIT_*) for some hints.

Fab.
----- Original Message -----
From: "Joao Prado Maia" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 8:10 PM
Subject: [PHP-DEV] PHP Extension Help


> Hi,
>
> Before starting up on this email, please be aware that I'm a newbie in C
> programming and especially in PHP extension coding. I tried researching
> about my doubt (and even talked with Joey Smith) but couldn't really have
> a definite answer.
>
> My ultimate goal for my little PHP extension is to try to learn C
> programming and also try to create a C extension to replace the use of the
> PHPLIB template class. I want to be able to basically create my extension
> and then 'plug-in' into my code and have it work as the PHPLIB template
> class would work.
>
> At first I tried creating an internal class like 'Directory' and have it
> somehow be able to do :
>
> $t = new JTemplate; // or something similar
>
> After speaking with Joey, I learned that you cannot do that (is this
> true?) because the 'new' operator doesn't look for built-in functions.
>
> However, I remember PHP-GTK and how you could do something like this:
>
> $win = &new GtkWindow();
>
> Isn't this 'GtkWindow' an example of how to register a built-in class and
> then have the code instantiate it normally as you would do it with a
> normal PHP based class ? (again, be nice. I'm a newbie :)
>
> Anyway, if someone could answer this simple question it would be very
> appreciated.
>
> Cheers,
> Joao
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to