Anonymous | Login | Signup for a new account | 12-17-2024 08:40 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0003898 | [Quercus] | minor | always | 02-20-10 13:28 | 03-29-13 00:26 | ||||
Reporter | syndetic | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 4.0.3 | ||||||
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. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed. 28 unique queries executed. |