public function removeBlock($type)
	{
		$output = '';

		$pluginType = $this->getPluginType($type);
		if ($pluginType & Dwoo::SMARTY_BLOCK) {
			$type = 'smartyinterface';
		}
		while (true) {
			while ($top = array_pop($this->stack)) {
				if ($top['custom']) {
					$class = $top['class'];
				} else {
					$class = 'Dwoo_Plugin_'.$top['type'];
				}
				if (count($this->stack)) {
					$this->curBlock =& $this->stack[count($this->stack)-1];
					$this->push(call_user_func(array($class, 'postProcessing'), $this, $top['params'], '', '', $top['buffer']), 0);
				} else {
					$null = null;
					$this->curBlock =& $null;
					$output = call_user_func(array($class, 'postProcessing'), $this, $top['params'], '', '', $top['buffer']);
				}

				if ($top['type'] === $type) {
					break 2;
				}
			}

			throw new Dwoo_Compilation_Exception($this, 'Syntax malformation, a block of type "'.$type.'" was closed but was not opened');
			break;
		}

		return $output;
	}