Skip to content

Instantly share code, notes, and snippets.

@danalmeida
Last active December 31, 2015 21:59
Show Gist options
  • Save danalmeida/8050405 to your computer and use it in GitHub Desktop.
Save danalmeida/8050405 to your computer and use it in GitHub Desktop.
<?php
abstract class BaseHandler {
protected $templateVariables;
public function __construct() {
$this->templateVariables = array(
'base_url' => BASE_URL
);
}
}
class TestHandler extends BaseHandler {
public function get() {
$tpl = $this->mustache->loadTemplate('test');
$this->templateVariables['foo'] = 'bar';
echo $tpl->render($this->templateVariables);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment