Transferring internal functions to the internal library
This commit is contained in:
parent
a68882140b
commit
a41dbbb950
22
lib.php
22
lib.php
@ -259,25 +259,3 @@ function local_webhooks_send_request($event, $callback) {
|
|||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
22
locallib.php
22
locallib.php
@ -68,6 +68,28 @@ function local_webhooks_cache_reset() {
|
|||||||
return $cache->purge();
|
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
|
* Description of functions of the call of events
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user