The use of `add()` is deprecated. `set()` should be the canonical method.
/**
* @inheritDoc
*/
- public function add(
+ public function set(
$objectType,
$objectID,
$message,
$languageID = null,
$metaData = ''
) {
- // delete existing entry
- $this->delete($objectType, [$objectID]);
+ $this->set(
+ $objectType,
+ $objectID,
+ $message,
+ $subject,
+ $time,
+ $userID,
+ $username,
+ $languageID,
+ $metaData
+ );
+ }
- // save new entry
- $this->add($objectType, $objectID, $message, $subject, $time, $userID, $username, $languageID, $metaData);
+ /**
+ * @inheritDoc
+ */
+ public function add(
+ $objectType,
+ $objectID,
+ $message,
+ $subject,
+ $time,
+ $userID,
+ $username,
+ $languageID = null,
+ $metaData = ''
+ ) {
+ $this->set(
+ $objectType,
+ $objectID,
+ $message,
+ $subject,
+ $time,
+ $userID,
+ $username,
+ $languageID,
+ $metaData
+ );
}
/**