Autarky\Application::getEnvironment PHP Метод

getEnvironment() публичный Метод

Get the current environment.
public getEnvironment ( ) : string
Результат string
    public function getEnvironment()
    {
        if (!$this->booting) {
            throw new \RuntimeException('Environment has not yet been resolved');
        }
        return $this->environment;
    }

Usage Example

Пример #1
0
 /**
  * Constructor.
  *
  * @param ChannelManager  $channelManager
  * @param Application     $application
  * @param ConfigInterface $config
  */
 public function __construct(ChannelManager $channelManager, Application $application, ConfigInterface $config)
 {
     $this->environment = $application->getEnvironment();
     $this->channelManager = $channelManager;
     $this->config = $config;
 }