MadelineProtoDocs/docs/PHP/danog/MadelineProto/Shutdown.md

62 lines
1.3 KiB
Markdown
Raw Normal View History

2020-10-15 18:42:54 +02:00
---
title: danog\MadelineProto\Shutdown: Class that controls script shutdown.
description:
---
# `danog\MadelineProto\Shutdown`
[Back to index](../../index.md)
> Author: Daniil Gentili <daniil@daniil.it>
Class that controls script shutdown.
## Method list:
* `shutdown(): void`
* `addCallback(callable $callback, null|string $id): int|\string The callback ID`
* `removeCallback(null|string|int $id): \bool true if the callback was removed correctly, false otherwise`
## Methods:
### `shutdown(): void`
Function to be called on shutdown.
2020-10-15 19:11:10 +02:00
---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
2020-10-15 18:42:54 +02:00
### `addCallback(callable $callback, null|string $id): int|\string The callback ID`
Add a callback for script shutdown.
Parameters:
* `$callback`: `callable` The callback to set
* `$id`: `null|string` The optional callback ID
Return value: The callback ID
2020-10-15 19:11:10 +02:00
---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
2020-10-15 18:42:54 +02:00
### `removeCallback(null|string|int $id): \bool true if the callback was removed correctly, false otherwise`
Remove a callback from the script shutdown callable list.
Parameters:
* `$id`: `null|string|int` The optional callback ID
Return value: true if the callback was removed correctly, false otherwise
2020-10-15 19:11:10 +02:00
---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
2020-10-15 18:42:54 +02:00
2020-10-15 19:11:10 +02:00
---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)