protected function module_themes() { //Get all themes that exists $directory = scandir(AppPath . '/themes/'); $themes = (array) null; foreach ($directory as $files) { if (is_dir(AppPath . 'themes/' . $files) && $files != '.' && $files != '..') { array_push($themes, $files); } } //get current active theme $registry = new cls_registry(); $active_theme = $registry->get('core', 'active_theme'); //get themes info $themes_info = (array) null; foreach ($themes as $theme_file) { include_once AppPath . '/themes/' . $theme_file . '/info.php'; array_push($themes_info, $theme); } //send to view for show themes return $this->view_themes($themes, $themes_info, $active_theme); }
<?php /* this file is perpare application of user for start working in this file set functions for start and use in themes */ ob_start("sys_render"); $registry = new cls_registry(); include_once './themes/' . $registry->get('core', 'active_theme') . '/index.php'; ob_end_flush(); ?>