Skip to content

Instantly share code, notes, and snippets.

@yholkamp
Created May 16, 2010 13:59
Show Gist options
  • Save yholkamp/402894 to your computer and use it in GitHub Desktop.
Save yholkamp/402894 to your computer and use it in GitHub Desktop.
<?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 shoulkd be visible.
This should not be visible.
@yholkamp
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment