public function getIndexTemplate($name)
    {
        if (!isset($this->templates[$name])) {
            throw new \InvalidArgumentException(sprintf('The index template "%s" does not exist', $name));
        }

        return $this->templates[$name];
    }
public function getIndexTemplate($name)
    {
        if (!isset($this->templates[$name])) {
            throw new \InvalidArgumentException(sprintf('The index template "%s" does not exist', $name));
        }

        return $this->templates[$name];
    }
public function getIndexTemplate ( $ name ) { if ( ! isset ( $ this -> templates [ $ name ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The index template "%s" does not exist' , $ name ) ) ; } return $ this -> templates [ $ name ] ; }
Gets an index template by its name.

@param string $name Index template to return

@return IndexTemplate

@throws \InvalidArgumentException if no index template exists for the given name
Gets an index template by its name .