From TinyMVC Documentation

Revision as of 20:10, 4 January 2011 by (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Learning by example

Lets extend the TinyMVC_Controller class:


class My_Controller extends TinyMVC_Controller
  function __construct()
  // do your class extensions here

Then in your controllers, just extend your custom controller:

class Hello_Controller extends My_Controller
  function index()

You do not need to include your extension file, TinyMVC will autoload it so long as it is named classname.php in the plugins directory.

The same procedure applies for extending TinyMVC_Model and TinyMVC_View.

Personal tools