Shmvc is a project mainly written in PHP, based on the MIT license.
Simple Hierarchical-Model-View-Controller PHP Framework
SHMVC stands for Simple, Hierarchical Model-View-Controller
It's a PHP framework for making websites. Simple.
config()
)App - your models, controllers and views
config
routes.php
plugins
public - js/css/images
Shmvc - system files
index.php - single bootsrap file
Plugins are similar to WordPress plugins. All .php files in the plugins
folder are automatically included. They are loaded after the autoloader is set up (so they can use any class) but before any URL routing is done.
Plugins can either hook into actions:
Shmvcadd_action('hook_name', 'my_plugin_action');
Or filter variables:
Shmvcadd_filter('hook_name', 'my_plugin_filter', $variable);
Helpers are normal classes that are used from a models/views/controllers, similar to Kohana helpers. E.g.
echo ShmvcHelperText::escape('>');
Or import the helper's namespace first:
use ShmvcHelperText;
echo Text::escape('>');