Files
sterivein/core/lib/Thelia/Model/Config.php
2013-01-10 16:51:37 +01:00

88 lines
2.8 KiB
PHP

<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program 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 */
/* */
/* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
namespace Thelia\Model;
use Thelia\Model\Base\Base;
class Config extends Base
{
protected $name;
protected $value;
protected $secure;
protected $hidden;
protected $properties = array(
"name",
"value",
"secure",
"hidden"
);
public function getName()
{
return $this->name;
}
public function setName($name)
{
$this->name = $name;
}
public function getValue()
{
return $this->value;
}
public function setValue($value)
{
$this->value = $value;
}
public function getSecure()
{
return $this->secure;
}
public function setSecure($secure)
{
$this->secure = $secure;
}
public function getHidden()
{
return $this->hidden;
}
public function setHidden($hidden)
{
$this->hidden = $hidden;
}
public function read($search, $default)
{
$result = $this->findOneBy("name",$search);
return $result ? $result->getValue() : $default;
}
}