// Format definitions

This commit is contained in:
rMalie
2011-12-13 16:34:09 +00:00
parent df60a82b0b
commit e4309d013f
10 changed files with 77 additions and 270 deletions
+3 -17
View File
@@ -36,10 +36,6 @@ class WebserviceKeyCore extends ObjectModel
/** @var string Webservice Account description */
public $description;
/**
* @see ObjectModel::$definition
*/
@@ -47,12 +43,12 @@ class WebserviceKeyCore extends ObjectModel
'table' => 'webservice_account',
'primary' => 'id_webservice_account',
'fields' => array(
'active' => array('type' => 'FILL_ME', 'validate' => 'isBool'),
'key' => array('type' => 'FILL_ME', 'required' => true, 'size' => 32),
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
'key' => array('type' => self::TYPE_STRING, 'required' => true, 'size' => 32),
'description' => array('type' => self::TYPE_STRING),
),
);
public function add($autodate = true, $nullValues = false)
{
if (WebserviceKey::keyExists($this->key))
@@ -67,16 +63,6 @@ class WebserviceKeyCore extends ObjectModel
WHERE `key` = \''.pSQL($key).'\'') ? false : true);
}
public function getFields()
{
$this->validateFields();
$fields['key'] = pSQL($this->key);
$fields['active'] = (int)$this->active;
$fields['description'] = pSQL($this->description);
return $fields;
}
public function delete()
{
if (!parent::delete() || $this->deleteAssociations() === false)