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

1.2 KiB

title: danog\MadelineProto\Shutdown: Class that controls script shutdown. description:

danog\MadelineProto\Shutdown

Back to index

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.

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