original_string: public function setTemplateOptions($name, $options)
      {
          if ($options instanceof Zend_Config) {
              $options = $options->toArray();
          } elseif (!is_array($options)) {
              // require_once 'Zend/Cache/Exception.php';
              throw new Zend_Cache_Exception('Options passed must be in'
                  . ' an associative array or instance of Zend_Config');
          }
          if (!isset($this->_optionTemplates[$name])) {
              throw new Zend_Cache_Exception('A cache configuration template'
                  . 'does not exist with the name "' . $name . '"');
          }
          $this->_optionTemplates[$name]
              = $this->_mergeOptions($this->_optionTemplates[$name], $options);
          return $this;
      }
code: public function setTemplateOptions($name, $options)
      {
          if ($options instanceof Zend_Config) {
              $options = $options->toArray();
          } elseif (!is_array($options)) {
              // require_once 'Zend/Cache/Exception.php';
              throw new Zend_Cache_Exception('Options passed must be in'
                  . ' an associative array or instance of Zend_Config');
          }
          if (!isset($this->_optionTemplates[$name])) {
              throw new Zend_Cache_Exception('A cache configuration template'
                  . 'does not exist with the name "' . $name . '"');
          }
          $this->_optionTemplates[$name]
              = $this->_mergeOptions($this->_optionTemplates[$name], $options);
          return $this;
      }
code_tokens: public function setTemplateOptions ( $ name , $ options ) { if ( $ options instanceof Zend_Config ) { $ options = $ options -> toArray ( ) ; } elseif ( ! is_array ( $ options ) ) { // require_once 'Zend/Cache/Exception.php'; throw new Zend_Cache_Exception ( 'Options passed must be in' . ' an associative array or instance of Zend_Config' ) ; } if ( ! isset ( $ this -> _optionTemplates [ $ name ] ) ) { throw new Zend_Cache_Exception ( 'A cache configuration template' . 'does not exist with the name "' . $ name . '"' ) ; } $ this -> _optionTemplates [ $ name ] = $ this -> _mergeOptions ( $ this -> _optionTemplates [ $ name ] , $ options ) ; return $ this ; }
docstring: Pass an array containing changes to be applied to a named
  configuration
  template
  
  @param  string $name
  @param  array $options
  @return Zend_Cache_Manager
  @throws Zend_Cache_Exception for invalid options format or if option templates do not have $name
docstring_tokens: Pass an array containing changes to be applied to a named configuration template