2020-10-15 18:42:54 +02:00
|
|
|
---
|
|
|
|
title: danog\MadelineProto\Ipc\Wrapper: Callback payload wrapper.
|
|
|
|
description:
|
|
|
|
|
|
|
|
---
|
|
|
|
# `danog\MadelineProto\Ipc\Wrapper`
|
|
|
|
[Back to index](../../../index.md)
|
|
|
|
|
|
|
|
> Author: Daniil Gentili <daniil@daniil.it>
|
|
|
|
|
|
|
|
|
|
|
|
Callback payload wrapper.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Method list:
|
|
|
|
* `create(mixed $data, \danog\MadelineProto\SessionPaths $ipc): \Generator`
|
|
|
|
* `wrap(object|callable $callback, bool $wrapObjects): void`
|
|
|
|
* `logger(string $param, int $level, string $file): void`
|
|
|
|
* `disconnect(): \Generator`
|
|
|
|
|
|
|
|
## Methods:
|
|
|
|
### `create(mixed $data, \danog\MadelineProto\SessionPaths $ipc): \Generator`
|
|
|
|
|
|
|
|
Constructor.
|
|
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
* `$data`: `mixed` Payload data
|
|
|
|
* `$ipc`: `\danog\MadelineProto\SessionPaths` IPC URI
|
|
|
|
|
|
|
|
|
|
|
|
Fully typed return value:
|
|
|
|
```
|
|
|
|
\Generator<int, \Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<mixed>, mixed, \danog\MadelineProto\Ipc\Wrapper>
|
|
|
|
```
|
|
|
|
#### See also:
|
|
|
|
* [`\danog\MadelineProto\SessionPaths`: Session path information.](../SessionPaths.md)
|
|
|
|
* `\Amp\Ipc\Sync\ChannelledSocket`
|
|
|
|
* `\Amp\Promise`
|
|
|
|
* `\Generator`
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-15 19:11:10 +02:00
|
|
|
---
|
|
|
|
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
|
2020-10-15 18:42:54 +02:00
|
|
|
|
|
|
|
### `wrap(object|callable $callback, bool $wrapObjects): void`
|
|
|
|
|
|
|
|
Wrap a certain callback object.
|
|
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
* `$callback`: `object|callable` Callback to wrap
|
|
|
|
* `$wrapObjects`: `bool` Whether to wrap object methods, too
|
|
|
|
|
|
|
|
|
2020-10-15 19:11:10 +02:00
|
|
|
---
|
|
|
|
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
|
2020-10-15 18:42:54 +02:00
|
|
|
|
|
|
|
### `logger(string $param, int $level, string $file): void`
|
|
|
|
|
|
|
|
Logger.
|
|
|
|
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
* `$param`: `string` Parameter
|
|
|
|
* `$level`: `int` Logging level
|
|
|
|
* `$file`: `string` File where the message originated
|
|
|
|
|
|
|
|
|
2020-10-15 19:11:10 +02:00
|
|
|
---
|
|
|
|
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
|
2020-10-15 18:42:54 +02:00
|
|
|
|
|
|
|
### `disconnect(): \Generator`
|
|
|
|
|
|
|
|
Disconnect cleanly from main instance.
|
|
|
|
|
|
|
|
|
|
|
|
Fully typed return value:
|
|
|
|
```
|
|
|
|
\Generator<int, \Amp\Promise, mixed, void>
|
|
|
|
```
|
|
|
|
#### See also:
|
|
|
|
* `\Amp\Promise`
|
|
|
|
* `\Generator`
|
|
|
|
|
|
|
|
|
|
|
|
|
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)
|