Accessing Environment Variables
This is an open discussion with 4 replies, filed under Troubleshooting.
Search
Try Frontend::instance()->Page()->Env()
My bad. Thanks!
BTW, should I prefer Frontend::instance()
or Symphony::Engine()
?
Page()->Env()
doesn't exist in a backend context, so Frontend::instance()
is the correct usage :)
Ah, thanks!
Create an account or sign in to comment.
In a custom datasource, I try to access the environment variables. Using the accessor function
Frontend::instance()->Env()
I get nothing (as in: nada). Using$this->_env
works fine though.Can anybody tell me why the accessor function doesn't work? (Symphony 2.2.5)