snappymail/rainloop/v/1.2.7.417/app/libraries/RainLoop/Settings.php
RainLoop Team 059d5f6b94 v1.2.7.417
2013-09-30 21:14:48 +04:00

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;
}
}