private function parseSiteSettings(\DOMNode $site) {

		if(is_null($this->site)) {

			$this->site = new \stdClass;
			$this->site->use_nice_uris = FALSE;

		}

		foreach($site->childNodes as $node) {

			if($node->nodeType !== XML_ELEMENT_NODE) {
				continue;
			}

			$v = trim($node->nodeValue);
			$k = $node->nodeName;

			switch ($k) {

				case 'locales':
					if(!isset($this->site->locales)) {
						$this->site->locales = [];
					}

					foreach($node->getElementsByTagName('locale') as $locale) {
						$loc = $locale->getAttribute('value');
						if($loc && !in_array($loc, $this->site->locales)) {
							$this->site->locales[] = $loc;
						}
						if($loc && $locale->getAttribute('default') === '1') {
							$this->site->default_locale = $loc;
						}
					}

					break;

				case 'site->use_nice_uris':
					if($v === '1') {
						$this->site->use_nice_uris = TRUE;
					}
					break;

				default:
					$this->site->$k = $v;
			}

		}

	}