From a41dbbb950d4a71aba46aaa25cecc811eb34242e Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Mon, 19 Feb 2018 13:44:11 +0400 Subject: Transferring internal functions to the internal library --- locallib.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'locallib.php') diff --git a/locallib.php b/locallib.php index 4d941ce..782714d 100644 --- a/locallib.php +++ b/locallib.php @@ -68,6 +68,28 @@ function local_webhooks_cache_reset() { return $cache->purge(); } +/** + * Data serialization. + * + * @param array|object $data + * @return string + */ +function local_webhooks_serialization_data($data) { + $result = serialize($data); + return $result; +} + +/** + * Data deserialization. + * + * @param string $data + * @return array|object + */ +function local_webhooks_deserialization_data($data) { + $result = unserialize($data); + return $result; +} + /** * Description of functions of the call of events * -- cgit v1.2.3