<commit_before><?php
require '../tessera.php';

class Gauntlet extends Tessera {
	
	function __before() {
		?>
		<ul>
			<li><a href="gauntlet.php?/first">/first</a></li>
			<li><a href="gauntlet.php?/second/foo">/second/$foo</a></li>
			<li><a href="gauntlet.php?/third/foo">/third/*</a></li>
			<li><a href="gauntlet.php?/fourth/foo/bar">/fourth/$foo/*</a></li>
			<li><a href="gauntlet.php?/fifth/foo">^/fifth/(\w+)</a></li>
			<li><a href="gauntlet.php?/sixth/foo/bar">/sixth/**</a></li>
			<li><a href="gauntlet.php?/seventh/foo/baz/bar/quux/zwei">/seventh/$foo/*/$bar/**</a></li>
		</ul>
		<p>The current request is: <strong><?php echo $this->request_path; ?></strong></p>
		<?php
	}

	function index() {
		echo "<p>The stress test!</p>";
	}
	
	function basic() {
		echo "First: PASS";
	}
	
	function named() {
		echo "<p>Testing named params</p>";
		echo "<pre>";
		print_r($this->params);
		echo "</pre>";
	}
	
	function splat() {
		echo "<p>Testing splat parameters</p>";
		echo "<pre>";
		print_r($this->splat);
		echo "</pre>";
	}
	
	function regex() {
		echo "<p>Testing regular expression matches</p>";
		echo "<pre>";
		print_r($this->params);
		echo "</pre>";
	}
	
	function mixed() {
		echo "<p>Testing named params</p>";
		echo "<pre>";
		print_r($this->params);
		echo "</pre>";
		echo "<p>Testing splat parameters</p>";
		echo "<pre>";
		print_r($this->splat);
		echo "</pre>";
	}
	
}

$gauntlet = new Gauntlet(array(
	'/' => 'index',
	'/first' => 'basic',
	'/second/$foo' => 'named',
	'/third/*' => 'splat',
	'/fourth/$foo/*' => 'mixed',
	'^/fifth/(\w+)' => 'regex',
	'/sixth/**' => 'splat',
	'/seventh/$foo/*/$bar/**' => 'mixed'
));<commit_msg>layouts now have to be explicitly specified<commit_after><?php
require '../tessera.php';

class Gauntlet extends Tessera {

	public $layout = 'layout';
	
	function __before() {
		?>
		<ul>
			<li><a href="gauntlet.php?/first">/first</a></li>
			<li><a href="gauntlet.php?/second/foo">/second/$foo</a></li>
			<li><a href="gauntlet.php?/third/foo">/third/*</a></li>
			<li><a href="gauntlet.php?/fourth/foo/bar">/fourth/$foo/*</a></li>
			<li><a href="gauntlet.php?/fifth/foo">^/fifth/(\w+)</a></li>
			<li><a href="gauntlet.php?/sixth/foo/bar">/sixth/**</a></li>
			<li><a href="gauntlet.php?/seventh/foo/baz/bar/quux/zwei">/seventh/$foo/*/$bar/**</a></li>
		</ul>
		<p>The current request is: <strong><?php echo $this->request_path; ?></strong></p>
		<?php
	}

	function index() {
		echo "<p>The stress test!</p>";
	}
	
	function basic() {
		echo "First: PASS";
	}
	
	function named() {
		echo "<p>Testing named params</p>";
		echo "<pre>";
		print_r($this->params);
		echo "</pre>";
	}
	
	function splat() {
		echo "<p>Testing splat parameters</p>";
		echo "<pre>";
		print_r($this->splat);
		echo "</pre>";
	}
	
	function regex() {
		echo "<p>Testing regular expression matches</p>";
		echo "<pre>";
		print_r($this->params);
		echo "</pre>";
	}
	
	function mixed() {
		echo "<p>Testing named params</p>";
		echo "<pre>";
		print_r($this->params);
		echo "</pre>";
		echo "<p>Testing splat parameters</p>";
		echo "<pre>";
		print_r($this->splat);
		echo "</pre>";
	}
	
	function support() {
		echo "<p>supporting you...{$this->params['page']}</p>";
	}
	
}

$gauntlet = new Gauntlet(array(
	'/' => 'index',
	'/first' => 'basic',
	'/second/$foo' => 'named',
	'/third/*' => 'splat',
	'/fourth/$foo/*' => 'mixed',
	'/support/$page' => 'support',
	'^/fifth/(\w+)' => 'regex',
	'/sixth/**' => 'splat',
	'/seventh/$foo/*/$bar/**' => 'mixed'
));
{'fraction_non_alphanumeric': 0.27410154021677124, 'fraction_numerical': 0.0, 'mean_word_length': 3.6450331125827815, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 151, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4693984', 'n_tokens_mistral': 1540, 'n_tokens_neox': 1390, 'n_words': 250}