Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
3898 | minor | always | 02-20-10 13:28 | 03-29-13 00:26 | |
|
|||||
Reporter: | syndetic | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 4.0.3 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.36 | ||
|
|||||
Summary: | 0003898: Quercus PHP does not understand Java enums | ||||
Description: |
A PHP script running atop the Quercus engine does not appear to be able to properly understand Java enums. Example: == Java ================ public class Foo { public enum Bar { BAZ, QUUX } } ======================== == PHP ================= import Foo; foreach(Foo->Bar AS $bar) { echo $bar; } // doesn't work foreach(Foo::Bar AS $bar) { ... } // doesn't work foreach(Foo->Bar->values() AS $bar) { ... } // doesn't work $foo = new Foo(); foreach($foo->Bar AS $bar) { ... } // doesn't work foreach($foo::Bar AS $bar) { ... } // doesn't work import Foo->Bar; // no import Foo::Bar; // still no echo Foo->Bar->BAZ; // no echo Foo->Bar::BAZ; // no echo Foo::Bar->BAZ; // no ======================== Unless my syntax is incorrect, Quercus does not know how to loop over enum values. Depending on how the enum is accessed, sometimes Quercus evaluates the enum itself as a unicode string, which is also wrong. I tried going into the source to find out how it's doing its parsing, but it was just way too much to go through. Please either indicate the correct way to loop over enum members or else put up a patch somewhere. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|