code: public function get($key)
      {
          if (!isset($this->instances[$key])) {
              throw new \LogicException('No instance for given key! (key: ' . $key . ')');
          }
  
          return $this->instances[$key];
      }
docs: Get instance for given key.
  
  @param  string $key Key name to retrieve the instance
  @return mixed
  @throws \LogicException