Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b1eb108388
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (26 sloc) 0.661 kb
<?php
require('../Tyke.php');
// debug enables display-errors and exception page
Tyke::set('core.debug', true);
// include more libraries, start a session ... feed the dog
// Sample controller
class Sample extends TykeC
{
public function index()
{
$this->forward(array('Sample', 'greet'), array('World'));
}
public function greet($name)
{
$this->name = htmlspecialchars(ucfirst($name));
// also available as $_GET['name']
$this->render('views/greeting.php');
}
}
Tyke::register(array(
'/' => array('Sample'), // method defaults to 'index'
'/welcome-(name:[-\w]+)' => array('Sample', 'greet')
));
// Let the dog out ...
Tyke::run();
?>
Jump to Line
Something went wrong with that request. Please try again.