--- title: danog\MadelineProto\Shutdown: Class that controls script shutdown. description: image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png --- # `danog\MadelineProto\Shutdown` [Back to index](../../index.md) > Author: Daniil Gentili 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. ### `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 ### `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 --- Generated by [danog/phpdoc](https://phpdoc.daniil.it)