original_string: public function setEngine($engine)
  	{
  		// if param given as an object
  		if ($engine instanceof Dwoo) {
  			$this->_engine = $engine;
  		}
  		//
  		elseif (is_subclass_of($engine, 'Dwoo') || 'Dwoo' === $engine) {
  			$this->_engine = new $engine();
  		}
  		else {
  			throw new Dwoo_Exception("Custom engine must be a subclass of Dwoo");
  		}
  	}
code: public function setEngine($engine)
  	{
  		// if param given as an object
  		if ($engine instanceof Dwoo) {
  			$this->_engine = $engine;
  		}
  		//
  		elseif (is_subclass_of($engine, 'Dwoo') || 'Dwoo' === $engine) {
  			$this->_engine = new $engine();
  		}
  		else {
  			throw new Dwoo_Exception("Custom engine must be a subclass of Dwoo");
  		}
  	}
code_tokens: public function setEngine ( $ engine ) { // if param given as an object if ( $ engine instanceof Dwoo ) { $ this -> _engine = $ engine ; } // elseif ( is_subclass_of ( $ engine , 'Dwoo' ) || 'Dwoo' === $ engine ) { $ this -> _engine = new $ engine ( ) ; } else { throw new Dwoo_Exception ( "Custom engine must be a subclass of Dwoo" ) ; } }
docstring: Sets template engine
  
  @param string|Dwoo Object or name of the class
docstring_tokens: Sets template engine