nano4/controllersbasic.php

This class represents a controller foundation.

The controller can have multiple models, and can load templates consisting of a layout, and a screen.

The contents of the screen will be made available as the $view_content variable in the layout.

You should create a base class to extend this that provides any application-specific common controller methods.

Your framework needs to define 'screens' and 'layouts' as view plugins. This is as easy as:

$nano->screens = ['plugin'=>'views', 'dir'=>'./views/screens']; $nano->layouts = ['plugin'=>'views', 'dir'=>'./views/layouts'];

Classes

Basic