protected function checkSetting(DOMNode $node, $setting)
	{
		if (!isset($this->settings[strtolower($setting)]))
		{
			// Test whether the value contains an odd number of {
			if (preg_match('/(?<!\\{)\\{(?:\\{\\{)*(?!\\{)/', $setting))
			{
				throw new UnsafeTemplateException('Cannot assess ' . $this->settingName . " setting '" . $setting . "'", $node);
			}

			throw new UnsafeTemplateException('Unknown ' . $this->settingName . " value '" . $setting . "'", $node);
		}

		$value    = $this->settings[strtolower($setting)];
		$maxValue = $this->settings[strtolower($this->maxSetting)];

		if ($value > $maxValue)
		{
			throw new UnsafeTemplateException($this->settingName . " setting '" . $setting . "' exceeds restricted value '" . $this->maxSetting . "'", $node);
		}
	}
protected function checkSetting(DOMNode $node, $setting)
	{
		if (!isset($this->settings[strtolower($setting)]))
		{
			// Test whether the value contains an odd number of {
			if (preg_match('/(?<!\\{)\\{(?:\\{\\{)*(?!\\{)/', $setting))
			{
				throw new UnsafeTemplateException('Cannot assess ' . $this->settingName . " setting '" . $setting . "'", $node);
			}

			throw new UnsafeTemplateException('Unknown ' . $this->settingName . " value '" . $setting . "'", $node);
		}

		$value    = $this->settings[strtolower($setting)];
		$maxValue = $this->settings[strtolower($this->maxSetting)];

		if ($value > $maxValue)
		{
			throw new UnsafeTemplateException($this->settingName . " setting '" . $setting . "' exceeds restricted value '" . $this->maxSetting . "'", $node);
		}
	}
protected function checkSetting ( DOMNode $ node , $ setting ) { if ( ! isset ( $ this -> settings [ strtolower ( $ setting ) ] ) ) { // Test whether the value contains an odd number of { if ( preg_match ( '/(?<!\\{)\\{(?:\\{\\{)*(?!\\{)/' , $ setting ) ) { throw new UnsafeTemplateException ( 'Cannot assess ' . $ this -> settingName . " setting '" . $ setting . "'" , $ node ) ; } throw new UnsafeTemplateException ( 'Unknown ' . $ this -> settingName . " value '" . $ setting . "'" , $ node ) ; } $ value = $ this -> settings [ strtolower ( $ setting ) ] ; $ maxValue = $ this -> settings [ strtolower ( $ this -> maxSetting ) ] ; if ( $ value > $ maxValue ) { throw new UnsafeTemplateException ( $ this -> settingName . " setting '" . $ setting . "' exceeds restricted value '" . $ this -> maxSetting . "'" , $ node ) ; } }
Test whether given setting is allowed

@param  DOMNode $node    Target node
@param  string  $setting Setting
@return void
Test whether given setting is allowed