Skip to content

Instantly share code, notes, and snippets.

@lcosta
Created November 22, 2008 18:49
Show Gist options
  • Save lcosta/27916 to your computer and use it in GitHub Desktop.
Save lcosta/27916 to your computer and use it in GitHub Desktop.
$pathLangFile = 'lang/' . $this->language . '.php';
$this->debug($pathLangFile, 'defaults values');
if(file_exists($pathLangFile)){
require($pathLangFile);
} else {
die('<h3 class="error">error: don\'t load language file.</h3>');
}
$this->t = new language();
$this->h = new html($this->language);
// set resources
if(include_once('resources/global.php')){
$this->r = new resources($this->t, $this->h);
} else {
$this->r = null;
}
$this->debug($this->defaults, 'defaults values');
$this->debug(array('language'=> $this->language, 'view'=>$this->view,'parameters'=>$this->parameters, '$_SESSION'=>$_SESSION), 'output var route');
// set template
$pathTemplateFile = 'views/default.php';
if(file_exists($pathTemplateFile)){
require($pathTemplateFile);
} else {
die('<h3 class="error">error: don\'t load template file.</h3>');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment