How to get a working environment in Symfony 1.4

I have some functions that I need to show only when the website starts in dev mode (or in the development environment). How can I programmatically determine which environment is currently in use?

eg.

// $inDevEnvironment = ? if ($inDevEnvironment) { // DEV feature here } 
+4
source share
1 answer

Use sfConfig::get('sf_environment'); . It returns the string dev in the dev environment.

See this page for more information: http://sunzhen.blogspot.com/2012/02/symfony-get-working-environmentdevelopm.html

+9
source

Source: https://habr.com/ru/post/1499055/


All Articles