Created
May 16, 2010 13:59
-
-
Save yholkamp/402894 to your computer and use it in GitHub Desktop.
This file contains 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 | |
class Home_Controller extends Layout_Controller { | |
public function __construct() { | |
parent::__construct(); | |
} | |
public function index() { | |
$this->template->content = new View('home/home'); | |
$this->template->title = 'Index'; | |
ob_start(); | |
$controller = new Home_Controller(); | |
$controller->test(); | |
$var = ob_get_clean(); | |
} | |
public function test() { | |
$this->template->content = new View('home/test'); | |
$this->template->title = 'Test'; | |
} | |
} | |
This file contains 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
This shoulkd be visible. |
This file contains 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
This should not be visible. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected output: "This shoulkd be visible."
Received output: "This shoulkd be visible. This should not be visible." (provided there is no template, else there'll be more of course)