Documentation:Instance

From TinyMVC

Jump to: navigation, search

[edit] Getting an Instance

There may be times you need to get an instance of the current object, such as within a library, so you can use the controller functions. You can get an instance at any time:

$tmvc = tmvc::instance();
 
$myvars['foo'] = 'bar';
$myvars['baz'] = 'gaz';
 
$output = $tmvc->view->fetch('some_view',$myvars);
Personal tools