diff options
author | Valentin Popov <info@valentineus.link> | 2019-05-10 14:11:24 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2019-05-10 14:19:18 +0300 |
commit | db2d98d210ae7c8df99d5cd2473f7e57fb5028f5 (patch) | |
tree | 7729b0f93f7a0b54d4668fb49001159dd6c0d039 /classes/local | |
parent | 5b0dba4980a0816e1c92b99a3a4cf6ec221f863f (diff) | |
download | local_webhooks-db2d98d210ae7c8df99d5cd2473f7e57fb5028f5.tar.xz local_webhooks-db2d98d210ae7c8df99d5cd2473f7e57fb5028f5.zip |
Renamed a classes function "create_service"
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'classes/local')
-rw-r--r-- | classes/local/api.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/classes/local/api.php b/classes/local/api.php index ea70a91..a025d16 100644 --- a/classes/local/api.php +++ b/classes/local/api.php @@ -50,10 +50,11 @@ final class api { * @param \local_webhooks\local\record $record * * @return int + * * @throws \coding_exception * @throws \dml_exception */ - public static function create_service(record $record): int { + public static function add_service(record $record): int { global $DB; $id = $DB->insert_record(LW_TABLE_SERVICES, $record); @@ -77,6 +78,7 @@ final class api { * @param int $id * * @return bool + * * @throws \dml_exception */ public static function delete_service(int $id): bool { @@ -91,6 +93,7 @@ final class api { * Get an event's list. * * @return array + * * @throws \ReflectionException */ public static function get_events(): array { @@ -103,6 +106,7 @@ final class api { * @param int $id * * @return \local_webhooks\local\record + * * @throws \dml_exception */ public static function get_service(int $id): record { @@ -132,6 +136,7 @@ final class api { * @param int|null $limit * * @return array + * * @throws \dml_exception */ public static function get_services(array $conditions = null, string $sort = null, int $from = null, int $limit = null): array { @@ -168,6 +173,7 @@ final class api { * @param string $name * * @return \local_webhooks\local\record[] + * * @throws \dml_exception */ public static function get_services_by_event(string $name): array { @@ -191,6 +197,7 @@ final class api { * Get a total count of existing records. * * @return int + * * @throws \dml_exception */ public static function get_total_count(): int { @@ -205,6 +212,7 @@ final class api { * @param \local_webhooks\local\record $service * * @return bool + * * @throws \coding_exception * @throws \dml_exception */ @@ -227,6 +235,7 @@ final class api { * Get a system's events list. * * @return array + * * @throws \ReflectionException */ private static function get_core_events_list(): array { @@ -308,6 +317,7 @@ final class api { * Get a plugins' events list. * * @return array + * * @throws \ReflectionException */ private static function get_non_core_event_list(): array { |