function get($alias) { $alias .= ':' . $this->language; if (isset($this->local[$alias])) { return $this->local[$alias]->xml(); } else { $xml = new xml(); $xml->append($xml->text("[Alias not found: {$alias}]")); return $xml; } }
function wwwtokenize($subject, $pattern) { $xml = new xml(); if (preg_match_all("/({$pattern})/", $subject, $matches)) { foreach ($matches[1] as $string) { $xml->append($xml->text($string)); } } return $xml->get(); }