original_string: public function setOptions(array $opt = array())
  	{
  		// BC checks
  		// TODO remove in 1.1
  		if (isset($opt['compileDir']) || isset($opt['compile_dir'])) {
  			trigger_error('Dwoo ZF Adapter: the compile dir should be set in the $options[\'engine\'][\'compileDir\'] value the adapter settings', E_USER_WARNING);
  		}
  
  		if (isset($opt['cacheDir']) || isset($opt['cache_dir'])) {
  			trigger_error('Dwoo ZF Adapter: the cache dir should be set in the $options[\'engine\'][\'cacheDir\'] value the adapter settings', E_USER_WARNING);
  		}
  		// end BC
  
  		// Making sure that everything is loaded.		
  		$classes = array('engine', 'dataProvider', 'compiler');
  		
  		// Setting options to Dwoo objects...
  		foreach ($opt as $type => $settings) {			
  			if (!method_exists($this, 'set' . $type)) {
  				throw new Dwoo_Exception("Unknown type $type");
  			}
  
  			if (is_string($settings) || is_object($settings)) {
  				call_user_func(array($this, 'set' . $type), $settings);
  			} elseif (is_array($settings)) {
  				// Set requested class
  				if (array_key_exists('type', $settings)) {
  					call_user_func(array($this, 'set' . $type), $settings['type']);
  				}
  				
  				if (in_array($type, $classes)) {
  					// Call get so that the class is initialized
  					$rel = call_user_func(array($this, 'get' . $type));
  	
  					// Call set*() methods so that all the settings are set.
  					foreach ($settings as $method => $value) {
  						if (method_exists($rel, 'set' . $method)) {
  							call_user_func(array($rel, 'set' . $method), $value);
  						}
  					}
  				} elseif ('templateFile' == $type) {
  					// Remember the settings for the templateFile
  					$this->_templateFileSettings = $settings;
  				}
  			}
  		}
  	}
code: public function setOptions(array $opt = array())
  	{
  		// BC checks
  		// TODO remove in 1.1
  		if (isset($opt['compileDir']) || isset($opt['compile_dir'])) {
  			trigger_error('Dwoo ZF Adapter: the compile dir should be set in the $options[\'engine\'][\'compileDir\'] value the adapter settings', E_USER_WARNING);
  		}
  
  		if (isset($opt['cacheDir']) || isset($opt['cache_dir'])) {
  			trigger_error('Dwoo ZF Adapter: the cache dir should be set in the $options[\'engine\'][\'cacheDir\'] value the adapter settings', E_USER_WARNING);
  		}
  		// end BC
  
  		// Making sure that everything is loaded.		
  		$classes = array('engine', 'dataProvider', 'compiler');
  		
  		// Setting options to Dwoo objects...
  		foreach ($opt as $type => $settings) {			
  			if (!method_exists($this, 'set' . $type)) {
  				throw new Dwoo_Exception("Unknown type $type");
  			}
  
  			if (is_string($settings) || is_object($settings)) {
  				call_user_func(array($this, 'set' . $type), $settings);
  			} elseif (is_array($settings)) {
  				// Set requested class
  				if (array_key_exists('type', $settings)) {
  					call_user_func(array($this, 'set' . $type), $settings['type']);
  				}
  				
  				if (in_array($type, $classes)) {
  					// Call get so that the class is initialized
  					$rel = call_user_func(array($this, 'get' . $type));
  	
  					// Call set*() methods so that all the settings are set.
  					foreach ($settings as $method => $value) {
  						if (method_exists($rel, 'set' . $method)) {
  							call_user_func(array($rel, 'set' . $method), $value);
  						}
  					}
  				} elseif ('templateFile' == $type) {
  					// Remember the settings for the templateFile
  					$this->_templateFileSettings = $settings;
  				}
  			}
  		}
  	}
code_tokens: public function setOptions ( array $ opt = array ( ) ) { // BC checks // TODO remove in 1.1 if ( isset ( $ opt [ 'compileDir' ] ) || isset ( $ opt [ 'compile_dir' ] ) ) { trigger_error ( 'Dwoo ZF Adapter: the compile dir should be set in the $options[\'engine\'][\'compileDir\'] value the adapter settings' , E_USER_WARNING ) ; } if ( isset ( $ opt [ 'cacheDir' ] ) || isset ( $ opt [ 'cache_dir' ] ) ) { trigger_error ( 'Dwoo ZF Adapter: the cache dir should be set in the $options[\'engine\'][\'cacheDir\'] value the adapter settings' , E_USER_WARNING ) ; } // end BC // Making sure that everything is loaded.		 $ classes = array ( 'engine' , 'dataProvider' , 'compiler' ) ; // Setting options to Dwoo objects... foreach ( $ opt as $ type => $ settings ) { if ( ! method_exists ( $ this , 'set' . $ type ) ) { throw new Dwoo_Exception ( "Unknown type $type" ) ; } if ( is_string ( $ settings ) || is_object ( $ settings ) ) { call_user_func ( array ( $ this , 'set' . $ type ) , $ settings ) ; } elseif ( is_array ( $ settings ) ) { // Set requested class if ( array_key_exists ( 'type' , $ settings ) ) { call_user_func ( array ( $ this , 'set' . $ type ) , $ settings [ 'type' ] ) ; } if ( in_array ( $ type , $ classes ) ) { // Call get so that the class is initialized $ rel = call_user_func ( array ( $ this , 'get' . $ type ) ) ; // Call set*() methods so that all the settings are set. foreach ( $ settings as $ method => $ value ) { if ( method_exists ( $ rel , 'set' . $ method ) ) { call_user_func ( array ( $ rel , 'set' . $ method ) , $ value ) ; } } } elseif ( 'templateFile' == $ type ) { // Remember the settings for the templateFile $ this -> _templateFileSettings = $ settings ; } } } }
docstring: Set object state from options array
  - engine        = engine class name|engine object|array of options for engine
  - dataProvider  = data provider class name|data provider object|array of options for data provider
  - compiler      = compiler class name|compiler object|array of options for compiler
  - templateFile  =
  
  Array of options:
  - type class name or object for engine, dataProvider or compiler
  - any set* method (compileDir for setCompileDir ...)
  
  @param  array $options
  @return Dwoo_Adapters_ZendFramework_View
docstring_tokens: Set object state from options array - engine = engine class name|engine object|array of options for engine - dataProvider = data provider class name|data provider object|array of options for data provider - compiler = compiler class name|compiler object|array of options for compiler - templateFile =