mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-10 16:58:07 +08:00
4cc2207513
Original unminified source code (dev folder - js, css, less) (fixes #6) Grunt build system Multiple identities correction (fixes #9) Compose html editor (fixes #12) New general settings - Loading Description New warning about default admin password Split general and login screen settings
64 lines
No EOL
908 B
PHP
64 lines
No EOL
908 B
PHP
<?php
|
|
|
|
namespace RainLoop;
|
|
|
|
class Settings
|
|
{
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $aData;
|
|
|
|
/**
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
$this->aData = array();
|
|
}
|
|
|
|
/**
|
|
* @param array $aData
|
|
*
|
|
* @return \RainLoop\Settings
|
|
*/
|
|
public function InitData($aData)
|
|
{
|
|
if (\is_array($aData))
|
|
{
|
|
$this->aData = $aData;
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function DataAsArray()
|
|
{
|
|
return $this->aData;
|
|
}
|
|
|
|
/**
|
|
* @param string $sName
|
|
* @param mixed $mDefValue = null
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function GetConf($sName, $mDefValue = null)
|
|
{
|
|
return isset($this->aData[$sName]) ? $this->aData[$sName] : $mDefValue;
|
|
}
|
|
|
|
/**
|
|
* @param string $sName
|
|
* @param mixed $mValue
|
|
*
|
|
* @return void
|
|
*/
|
|
public function SetConf($sName, $mValue)
|
|
{
|
|
$this->aData[$sName] = $mValue;
|
|
}
|
|
} |