class Theme
{
function __construct()
{
}
function load( $folder, $file )
{
$theme_path = ROOTPATH . '/theme/' . $folder . '/' . $file . '.php';
require_once($theme_path);
return TRUE;
}
}
index.php
<?php
require class.theme.php
$theme = new Theme;
$theme->load('site','index');
?>
sitem / index.php
<?php
// to work i need another $theme = new theme; why can i do this ? can i make
it make it work twice or more inside the function load ?
$theme->load('site','header');
$theme->load('site','footer');
?>
nedense bu tema = new Tema $ gerekir; Yine site / index.php on
o iş yapmak için başka bir yol var mı? belki benim sınıf tasarımı iyi değil ya da algoritma başarısız oluyor.
edit* more information ok so what im trying to do is to load header view footer view.