Last active
December 31, 2015 21:59
-
-
Save danalmeida/8050405 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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