MCPcopy Index your code
hub / github.com/atomicon/codeigniter-theme / __construct

Method __construct

controllers/theme_example.php:5–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3class Theme_example extends CI_Controller {
4
5 public function __construct()
6 {
7 parent::__construct();
8
9 //load helpers
10 $this->load->helper( array('url', 'cookie'));
11
12 //load theme spark
13 $this->load->spark('theme/1.0.0');
14
15 //try to get the theme from the cookie
16 $theme = get_cookie('theme');
17 if (in_array($theme, array('default', 'skeleton')))
18 {
19 //got a valid theme... set it
20 $this->theme->set_theme($theme);
21 }
22 }
23
24 public function index()
25 {

Callers

nothing calls this directly

Calls 1

set_themeMethod · 0.80

Tested by

no test coverage detected