protected function _setOptions(array $options) {
		if (isset($options['escape'])) {
			if (!is_callable($options['escape'])) {
				throw new InvalidArgumentException('Mustache constructor "escape" option must be callable');
			}
			$this->_escape = $options['escape'];
		}

		if (isset($options['charset'])) {
			$this->_charset = $options['charset'];
		}

		if (isset($options['delimiters'])) {
			$delims = $options['delimiters'];
			if (!is_array($delims)) {
				$delims = array_map('trim', explode(' ', $delims, 2));
			}
			$this->_otag = $delims[0];
			$this->_ctag = $delims[1];
		}

		if (isset($options['pragmas'])) {
			foreach ($options['pragmas'] as $pragma_name => $pragma_value) {
				if (!in_array($pragma_name, $this->_pragmasImplemented, true)) {
					throw new MustacheException('Unknown pragma: ' . $pragma_name, MustacheException::UNKNOWN_PRAGMA);
				}
			}
			$this->_pragmas = $options['pragmas'];
		}

		if (isset($options['throws_exceptions'])) {
			foreach ($options['throws_exceptions'] as $exception => $value) {
				$this->_throwsExceptions[$exception] = $value;
			}
		}
	}