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;
				}
			}
		}
	}