mirror of
https://github.com/agdsn/ancient-weatherstation.git
synced 2026-06-19 23:07:59 +00:00
Working on Frontend
git-svn-id: file:///home/jan/tmp/wetterstation/trunk@23 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
@@ -10,24 +10,24 @@ class ModuleSet{
|
||||
|
||||
/* Konstruktor */
|
||||
function ModuleSet($setName){
|
||||
$parser = $this->getParserInstance(); /* Parserinstanz holen */
|
||||
$parser->parseContent($this->getSetFilename($setName), $this, NULL); /* Set Parsen */
|
||||
$parser = $this->_getParserInstance(); /* Parserinstanz holen */
|
||||
$parser->parseContent($this->_getSetFilename($setName), $this, NULL); /* Set Parsen */
|
||||
}
|
||||
|
||||
/* Dateinamen eines Setz aus dessen Namen zusammenbauen */
|
||||
function getSetFilename($setName){
|
||||
function _getSetFilename($setName){
|
||||
return "content/module_sets/set_".$setName.".html";
|
||||
}
|
||||
|
||||
/* Parser Instanzieren (wenn noch nicht ist) und zurückgeben */
|
||||
function getParserInstance(){
|
||||
function _getParserInstance(){
|
||||
if($this->parserInstance==NULL)
|
||||
$parserInstance = new Parser();
|
||||
return $parserInstance;
|
||||
}
|
||||
|
||||
/* Ein Modul hinzufügen */
|
||||
function addModule($modName){
|
||||
function _addModule($modName){
|
||||
$params = explode("_",$modName); /* Modulname und Sensorid trennen */
|
||||
include("content/modules/mod_".$params[0].".html");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user