From: Peter N. <pn...@kr...> - 2005-01-31 10:07:42
|
Hi, for a few days I have been testing the php-java-bridge and I must admit it seems pretty mature and useful. :-> One slight problem remains though. I do need to call a java-method which will return a (dynamic sized)Java-Array of Java-Objects. signature of the java-method: public NameValue[] process_context() usage via php-java-bridge: $nameValues = $activity->process_context(); So far I couldn't figure out a way how to iterate through all the elements of the returned array in PHP. It seems not possible to access the java.length property '$nameValues->length' nor will a 'foreach ($nameValues as $value) { echo "soemthing" }' work. Are there any means available so I can determine how many elements are in $nameValues? I did see the provided examples and manual regarding the use of arrays but I am not quite sury about it yet. ;( Do I need to modify the native Java-Class so it provides another java-interface(collection,ArrayList)? Thx, Peter |