<?php
/*
Bee-rain-ui
Copyright (C) 2008-2009 Mathieu Lory <hide@address.com>
This file is part of Bee-rain-ui.
Bee-rain-ui is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Bee-rain-ui is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Bee-rain-ui. If not, see <http://www.gnu.org/licenses/>.
Project started on 2008-11-22 with help from Serg Podtynnyi
<hide@address.com>
*/
/**
* @package Bee-rain-ui
* @subpackage Settings
* @author Mathieu Lory <hide@address.com>
*/
if (basename($_SERVER["SCRIPT_NAME"])==basename(__FILE__))die();
final class Settings
{
public static $VIEWER_TYPE = VIEWER_TYPE;
public static $DB_TYPE = DB_TYPE;
public static $subdirsRegistered = array();
public static $vars = array();
public function getSubdirsRegistered()
{
return self::$subdirsRegistered;
}
public function getVar($varName)
{
//print_r(self::$vars);
return self::$vars[strToLower($varName)];
}
public function setVar($varName, $value)
{
self::$vars[strToLower($varName)] = $value;
return self::$vars[$varName];
}
public function registerSubdir($dir=NULL, $pluginName=NULL)
{
if ( $dir != NULL ) self::$subdirsRegistered[$pluginName][] = $dir;
//$d = array($pluginName => $dir);
//if ( $dir != NULL ) array_push(self::$subdirsRegistered, $d);
return self::$subdirsRegistered;
}
}
?>