original_string: protected function resolveDriver($name)
      {
          if ( ! isset($this->drivers[$name]) || ! $this->container->has($this->drivers[$name])) {
              throw new \RuntimeException(sprintf(
                  'Caching driver "%s" does not exist or is not registered as a service.',
                  $name
              ));
          }
  
          $driver = $this->container->get($this->drivers[$name]);
  
          if ( ! $driver instanceof DriverInterface) {
              throw new \RuntimeException(sprintf(
                  'Service "%s" is not a valid caching driver.',
                  $this->drivers[$name]
              ));
          }
  
          return $driver;
      }
code: protected function resolveDriver($name)
      {
          if ( ! isset($this->drivers[$name]) || ! $this->container->has($this->drivers[$name])) {
              throw new \RuntimeException(sprintf(
                  'Caching driver "%s" does not exist or is not registered as a service.',
                  $name
              ));
          }
  
          $driver = $this->container->get($this->drivers[$name]);
  
          if ( ! $driver instanceof DriverInterface) {
              throw new \RuntimeException(sprintf(
                  'Service "%s" is not a valid caching driver.',
                  $this->drivers[$name]
              ));
          }
  
          return $driver;
      }
code_tokens: protected function resolveDriver ( $ name ) { if ( ! isset ( $ this -> drivers [ $ name ] ) || ! $ this -> container -> has ( $ this -> drivers [ $ name ] ) ) { throw new \ RuntimeException ( sprintf ( 'Caching driver "%s" does not exist or is not registered as a service.' , $ name ) ) ; } $ driver = $ this -> container -> get ( $ this -> drivers [ $ name ] ) ; if ( ! $ driver instanceof DriverInterface ) { throw new \ RuntimeException ( sprintf ( 'Service "%s" is not a valid caching driver.' , $ this -> drivers [ $ name ] ) ) ; } return $ driver ; }
docstring: Resolve caching driver from name.
  
  @param  string $name
  
  @return DriverInterface
docstring_tokens: Resolve caching driver from name .