/** * __invoke * * @param ContainerInterface $container * * @return null|\Reliv\Server\Entity\Environment * @throws \Exception */ public function __invoke(ContainerInterface $container) { $instance = \Reliv\Server\Environment::getInstance(); if (empty($instance)) { throw new \Exception('Reliv\\Server\\Environment MUST be build before configuration. No instance returned'); } return $instance; }