From:
<pab...@gm...> - 2007-11-20 12:29:41
|
Hello, I need to access a C++ object pointer attributes from PHP, this pointer is returned from a function: Interface file: %module tpdatos %{ #include "serviceProvider.h" %} class ComboItem{ public: ComboItem(); ~ComboItem(); ComboItem(const ComboItem&); int id; char* label; }; ComboItem* findAllStation(); Function in C++: ComboItem* findAllStation(){ ComboItem* item = new ComboItem(); item->id = 12; item->label = "Bar"; return item; } I need to access the returned pointer attributes from PHP, something like: $item = tpdatos::findAllStation(); $id = $item->id; $label = $item->label; Is this the right way? Because I'm getting blanks on $id and $label... Thanks in advance! Pablo |