IcePHP__t_type globals

in Help Center
Ice 3.4.1, PHP 5.3.4
I am attempting to use Ice to implement a control panel in PHP, using an MVC framework (CakePHP). The nature of the framework prevents Ice's globals (IcePHP__t_bool, IcePHP__t_byte, IcePHP__t_short, IcePHP__t_int, IcePHP__t_long, IcePHP__t_float, IcePHP__t_double, IcePHP__t_string) from working. I could do "global $IcePHP__t_type" for each type in every place I want to use them, but that's far from pretty. Why aren't these enscapulated in the $ICE object created by Ice\initialize()?
I am attempting to use Ice to implement a control panel in PHP, using an MVC framework (CakePHP). The nature of the framework prevents Ice's globals (IcePHP__t_bool, IcePHP__t_byte, IcePHP__t_short, IcePHP__t_int, IcePHP__t_long, IcePHP__t_float, IcePHP__t_double, IcePHP__t_string) from working. I could do "global $IcePHP__t_type" for each type in every place I want to use them, but that's far from pretty. Why aren't these enscapulated in the $ICE object created by Ice\initialize()?
0
Comments
Welcome to the forum.
Can you explain a bit more about the situation in which these globals aren't available? It will help us to ensure we get the necessary changes included in a future release.
Thanks,
Mark
A simple example, even outside of a framework, with just two pages:
Output:
The only way to make it work is to explicitly global $IcePHP__t_type; in every function Ice is used in. Hopefully a near-future version will make these part of the object returned by initialize().
Mark, actually we've been talking about exactly the same thing as Gordon does. Please, recall our conversation here.
...and, if you have a solution, please, share! I'm very, very, very much like the idea of using Ice from PHP on my site!..