PHP Extension Help

From: Date: Thu, 27 Jun 2002 01:10:06 +0000
Subject: PHP Extension Help
Groups: php.dev 
Request: Send a blank email to php-dev+get-85618@lists.php.net to get a copy of this message
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

« previous php.dev (#85618) next »