{$name} = new $service_name(); } catch (\Exception $e) { return null; } return $service; } /** * @return object|null */ public function get_configuration() { $this->configuration = empty($this->configuration) ? $this->get_service('configuration') : $this->configuration; return $this->configuration; } /** * @return object|null */ public function get_api() { $this->api = empty($this->api) ? $this->get_service('api') : $this->api; return $this->api; } }