<?php

class WikiTranslatorToCMode extends WikiTranslatorMode {



	protected $toc;



	public function __construct(WikiTranslatorToC $toc) {
		$this->toc = $toc;
	}



	public function open() {
		return '<ul class="toc">';
	}



	public function close() {
		return '</ul>';
	}



	public function parse($ln) {
		return $this->toc;
	}



	public static function buildIfMatch($ln, WikiTranslatorToC $toc) {
		if ($ln == '*TOC*') {
			return new WikiTranslatorToCMode($toc);
		}
		return null;
	}



} // class WikiTranslationToCMode

?>