import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -9,12 +9,13 @@
|
||||
* @packager Keyboard Monkeys
|
||||
*/
|
||||
|
||||
class Settings extends Monkeys_Db_Table_Gateway
|
||||
class Model_Settings extends Monkeys_Db_Table_Gateway
|
||||
{
|
||||
protected $_name = 'settings';
|
||||
protected $_primary = 'name';
|
||||
|
||||
const MAINTENANCE_MODE = 'maintenance_mode';
|
||||
const VERSION = 'version';
|
||||
|
||||
public function get($name)
|
||||
{
|
||||
@ -23,6 +24,10 @@ class Settings extends Monkeys_Db_Table_Gateway
|
||||
|
||||
$row = $this->fetchRow($select);
|
||||
|
||||
if (!$row) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $row->value;
|
||||
}
|
||||
|
||||
@ -35,4 +40,9 @@ class Settings extends Monkeys_Db_Table_Gateway
|
||||
{
|
||||
return $this->get(self::MAINTENANCE_MODE);
|
||||
}
|
||||
|
||||
public function getVersion()
|
||||
{
|
||||
return $this->get(self::VERSION);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user