# using classes/objects in extensions

- Thread: https://externals.io/message/33103
- Original archive: https://news-web.php.net/php.internals/33103
- Started by Andrew O. Shadoura on 2007-11-13T05:14:38+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #33103 — Andrew O. Shadoura — 2007-11-13T05:14:38+00:00

URL: https://externals.io/message/33103#33103

Hello.

Can anybody suggest me any docs/tutorials on writing php extensions using
Zend API those can work with classes/objects, i.e. declare some classes,
create instances of others etc.

Thanks.

-- 
WBR, Andrew

---

## #33105 — Hartmut Holzgraefe — 2007-11-13T09:14:06+00:00

URL: https://externals.io/message/33103#33105 · In reply to: #33103

Andrew O. Shadoura wrote:
> Hello.
> 
> Can anybody suggest me any docs/tutorials on writing php extensions using
> Zend API those can work with classes/objects, i.e. declare some classes,
> create instances of others etc.
> 
> Thanks.
> 
ok, time again for the usual shameless plug:

If you're not afraid of code generators doing part of the
work you might try

   http://php-baustelle.de/CodeGen_PECL

Its OO features are documented in

   http://php-baustelle.de/CodeGen_PECL/manual.html#AEN536

The current source for this package is available using

   svn checkout svn://php-baustelle.de/CodeGenerators/trunk/CodeGen_PECL

in there you'll find a subdirectory CodeGen_PECL/docs/examples
with lots of example files for OO features. Even if you don't
want to use the generator yourself the code generated for these
examples might prove useful.

That aside "Extending and Embedding PHP" is probably a
must have:

   http://www.informit.com/store/product.aspx?isbn=067232704X

-- 
Hartmut Holzgraefe, Principal Support Engineer
               .
Discover new MySQL Monitoring & Advisory features at:
http://www.mysql.com/products/enterprise/whats_new.html

Hauptsitz: MySQL GmbH, Dachauer Str.37, 80335 München
Geschäftsführer: Kaj Arnö - HRB München 162140
