Hey.
Just a while ago, i started writing a C++ library, that I would like to utilize in PHP. Since the
original aproach was made in C++, I would like to keep the OOP syntax in PHP.
Already, months ago, I had tried to find ways to write useful PHP modules. But the major problem was
always: How. I easily found documentation about adding functions…and how to expose a void pointer
in the form of a „Resource“. But that was all that was ever properly documented. The OO module
api was never really documented, and yet, is still hard to figure out. I was sent a slideshow of the
api…but is a set of slides a really well made documentation? I think not.
Many of you internals probably know the APIs needed to do these things:
- Create a class with public/private/protected methods - thus making a class final.
- Being able to store a pointer to forgein objects into the class, to re-use it.
I have been learning to use the v8 API a lot and it has a very clean syntax. A third-party scripting
language brought it even so far, that it could almost map native types to script types - but that
was pure C++ - both of them.
My simple question is hereby:
- When will the module API ever be properly documented?
Now, at some point, I want to embed PHP into my project. Like, I have the idea for a project, but I
want to utilize a scripting language for it. None of the languages supports the syntax that I am
used from PHP. And furthermore, neither v8 or PHP have an easy embedding way. V8 needs to utilize
GYP, and PHP autotools. Both not very optimal, but eh.
I simply want to know how I can take advantage of the embed-SAPI for my application - and how I can
possibly integrate my project into PHP’s build process. Must I maintain configure.ac+makefile.am?
Or is there anothe way to directly implement my code into the PHP build process?
And my question hereby is:
- When will the embed-SAPI be documented in a way, that it can be used? I havent found any useful
docs for embedding PHP…
Hope you understand what I am trying to ask ^^;
Kind regards, Ingwie.