Creating a class in a php extension

php.internals

Jordan Wambaugh

19 years ago
I've just recently begun writing PHP extensions for the first time. Sara Golemon's article on extension development has been a priceless resource for me, but I haven't been able to find any documentation on how to define a class, give it methods and properties etc within an extension. Is there any documentation on this? If not, can someone point me in the right direction? Thanks,
-- Jordan CM Wambaugh Software Engineer ForRent.com Dominion Enterprises jordan.wambaugh@forrent.com AIM: martamius Phone: 757-351-8300

Stut

19 years ago
Jordan Wambaugh wrote:
> I've just recently begun writing PHP extensions for the first time. Sara > Golemon's article on extension development has been a priceless resource for > me, but I haven't been able to find any documentation on how to define a > class, give it methods and properties etc within an extension. Is there any > documentation on this? If not, can someone point me in the right direction?
Buy the book: Extending and Embedding PHP by Sara Goleman. It covers classes and a whole lot more. Required reading for anyone developing PHP extensions. -Stut
-- http://stut.net/

muquaddim

19 years ago
I think you have to buy the Sara's Book Very good book.

Pierre Joye

19 years ago
On 6/19/07, muquaddim <shiplu.net@gmail.com> wrote:
> I think you have to buy the Sara's Book
Or/and read the sources. PHP or PECL are full of extensions implementing classes :) --Pierre

Johannes Schlueter

19 years ago
Hi Jordan, next to the book, which is a good reading there are some lsides from Marcus at talks.somabo.de (look for "Code Camp" or something like that) which give an introduction, but well, slides are always made for being explained during a talk :-) johannes On Tue, 2007-06-19 at 13:53 -0400, Jordan Wambaugh wrote:

Greg Beaver

19 years ago
Jordan Wambaugh wrote:
> I've just recently begun writing PHP extensions for the first time. Sara > Golemon's article on extension development has been a priceless resource for > me, but I haven't been able to find any documentation on how to define a > class, give it methods and properties etc within an extension. Is there any > documentation on this? If not, can someone point me in the right direction?
Hi Jordan, The extensions in ext/ and pecl/ (particularly the simple ones like pecl/spread http://cvs.php.net/viewvc.cgi/pecl/spread/php_spread.c?view=markup) demonstrate the process. I find http://lxr.php.net extremely useful for quickly finding the connections in source code. Greg