fuel/parser — Issue #37: View's Forge Function doesn't work like Core View Forge Function
Author: dmyers
Created: 2011-12-29 16:40:21+00:00
State: open

Something I noticed and I was wondering your guys thoughts on was that the Parser's View::Forge() function doesn't work the same as Core View::Forge() function.

Basically you can could store an instance of the View::forge() in say your controller and not pass any template file name or data for the template and later do it, this is useful for the flow of your application IMO, but with Parser's View::forge() it is optional as a null, but doesn't ignore empty files like the Core View::forge(). Confusing to explain, but maybe someone will understand.

Example:

public $view;

public function before()
{
$this->view = View::forge();
}

public function after($response)
{
return $request->body($this->view);
}

public function test_action()
{
$this->view->variable = 'test';
}