/** * Set a new template contents * */ public function setContents($contents) { if (!OOTemplate_Setting::isUTF8($this->_contents)) { throw new OOTemplate_Exception("Templates can only be constructed " . "from unicode or UTF-8 strings."); } $this->_contents = $contents; $this->tokenize(); return $this; }