A view class for php
in composer.json:
require: {
"stonenyy/view": "dev-master"
}
in autoload.php:
use STONENYY\View as View;
View::config(['path' => APP_PATH.'/views/']);in *controller.php:
use STONENYY\View as View;
View::set(array('data' => array('test')));
View::show('home'); //this 'home' is home.php in view pathin home.php:
var_dump($data);