ContactProperty and FilterCondition use reviveFromJson

This commit is contained in:
djmaze 2020-10-20 10:27:00 +02:00
parent 9844c1882c
commit 2470f1add6
9 changed files with 78 additions and 75 deletions

View file

@ -151,14 +151,14 @@ class Property implements \JsonSerializable
// Simple hack
if ($this && $this->IsWeb())
{
$this->Value = \preg_replace('/(skype|ftp|http[s]?)\\\:\/\//i', '$1://', $this->Value);
$this->Value = \preg_replace('#(https?)\\\://#i', '$1://', $this->Value);
}
return array(
'@Object' => 'Object/Property',
'IdProperty' => $this->IdProperty,
'Type' => $this->Type,
'TypeStr' => $this->TypeStr,
'Value' => \MailSo\Base\Utils::Utf8Clear($this->Value)
'@Object' => 'Object/ContactProperty',
'id' => $this->IdProperty,
'type' => $this->Type,
'typeStr' => $this->TypeStr,
'value' => \MailSo\Base\Utils::Utf8Clear($this->Value)
));
}
}

View file

@ -91,11 +91,11 @@ class FilterCondition implements \JsonSerializable
public function jsonSerialize()
{
return array(
// '@Object' => 'Object/FilterCondition',
'Field' => $this->Field(),
'Type' => $this->Type(),
'Value' => $this->Value(),
'ValueSecond' => $this->ValueSecond()
'@Object' => 'Object/FilterCondition',
'field' => $this->Field(),
'type' => $this->Type(),
'value' => $this->Value(),
'valueSecond' => $this->ValueSecond()
);
}
}