From:             [EMAIL PROTECTED]
Operating system: Any
PHP version:      4.1.1
PHP Bug Type:     Feature/Change Request
Bug description:  php_java array access

Hello,

Currently under the php_java extension to access array 
elements you must pull the whole array/hashtable into a php 
variable before you can access its elements. e.g.
r.java
#######################################
import java.util.*;
public class r {
  public Hashtable y = new Hashtable();
  public void r() {
    y.put("x","xx");
  }
}
#######################################
<?php
  $je = new Java("r");
  $je->r();
  $ht = $je->y;
  echo $ht["x"];
?>

It would be much nicer (and more php'esque) to access the 
array and hashtable variables directly like so :-
<?php
  $je = new Java("r");
  $je->r();
  echo $je->y["x"];
?>
As a trial I ported my custom database access class to Java 
JDBC with connection pooling, which went very smoothly bar 
this one difference (I have relied heavily on '$je->
y["x"];' style access in my arrays in my pages).

I have had a little stab at figuring out from the source 
how to implement this, but it is beyond my abilities. Hence 
my feature request.

REGARDS
Paul

-- 
Edit bug report at: http://bugs.php.net/?id=15128&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to