original_string: protected function getResourceType($name)
      {
          if (!isset($this->types[$name])) {
              $template = $this->parser->parse($name);
              if ($template instanceof TemplateReferenceInterface) {
                  $this->types[$name] = $template->get('engine');
              }
          }
          if (!isset($this->types[$name])) {
              throw new \RuntimeException("Could not load the given resource.");
          }
  
          return $this->types[$name];
      }
code: protected function getResourceType($name)
      {
          if (!isset($this->types[$name])) {
              $template = $this->parser->parse($name);
              if ($template instanceof TemplateReferenceInterface) {
                  $this->types[$name] = $template->get('engine');
              }
          }
          if (!isset($this->types[$name])) {
              throw new \RuntimeException("Could not load the given resource.");
          }
  
          return $this->types[$name];
      }
code_tokens: protected function getResourceType ( $ name ) { if ( ! isset ( $ this -> types [ $ name ] ) ) { $ template = $ this -> parser -> parse ( $ name ) ; if ( $ template instanceof TemplateReferenceInterface ) { $ this -> types [ $ name ] = $ template -> get ( 'engine' ) ; } } if ( ! isset ( $ this -> types [ $ name ] ) ) { throw new \ RuntimeException ( "Could not load the given resource." ) ; } return $ this -> types [ $ name ] ; }
docstring: Returns the type of a resource
  
  @param  string $name the name of the resource
  @return string type of the resource
  
  @throws \RuntimeException if the resource could not be loaded
docstring_tokens: Returns the type of a resource