Add PHPDocs
This commit is contained in:
parent
e15b11644a
commit
8fb792d5ca
2767
docs/PHP/danog/MadelineProto/API.md
Normal file
2767
docs/PHP/danog/MadelineProto/API.md
Normal file
File diff suppressed because it is too large
Load Diff
18
docs/PHP/danog/MadelineProto/ApiWrappers/Start.md
Normal file
18
docs/PHP/danog/MadelineProto/ApiWrappers/Start.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\ApiWrappers\Start: Manages simple logging in and out.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\ApiWrappers\Start`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages simple logging in and out.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
58
docs/PHP/danog/MadelineProto/Async/AsyncConstruct.md
Normal file
58
docs/PHP/danog/MadelineProto/Async/AsyncConstruct.md
Normal file
@ -0,0 +1,58 @@
|
||||
---
|
||||
title: danog\MadelineProto\Async\AsyncConstruct: Async constructor class.
|
||||
description: Manages asynchronous construction and wakeup of classes
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Async\AsyncConstruct`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Async constructor class.
|
||||
|
||||
Manages asynchronous construction and wakeup of classes
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `init(): void`
|
||||
* `initAsynchronously(): \Generator`
|
||||
* `inited(): bool`
|
||||
* `forceInit(bool $inited): void`
|
||||
|
||||
## Methods:
|
||||
### `init(): void`
|
||||
|
||||
Blockingly init.
|
||||
|
||||
|
||||
|
||||
### `initAsynchronously(): \Generator`
|
||||
|
||||
Asynchronously init.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `inited(): bool`
|
||||
|
||||
Check if we've already inited.
|
||||
|
||||
|
||||
|
||||
### `forceInit(bool $inited): void`
|
||||
|
||||
Mark instance as (de)inited forcefully.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$inited`: `bool` Whether to mark the instance as inited or deinited
|
||||
|
||||
|
||||
|
481
docs/PHP/danog/MadelineProto/Connection.md
Normal file
481
docs/PHP/danog/MadelineProto/Connection.md
Normal file
@ -0,0 +1,481 @@
|
||||
---
|
||||
title: danog\MadelineProto\Connection: Connection class.
|
||||
description: Manages connection to Telegram datacenters
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Connection`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Connection class.
|
||||
|
||||
Manages connection to Telegram datacenters
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `needReconnect(bool $needsReconnect): void`
|
||||
* `shouldReconnect(): bool`
|
||||
* `writing(bool $writing): void`
|
||||
* `reading(bool $reading): void`
|
||||
* `haveRead(): void`
|
||||
* `getLastChunk(): float`
|
||||
* `httpReceived(): void`
|
||||
* `countHttpReceived(): int`
|
||||
* `httpSent(): void`
|
||||
* `countHttpSent(): int`
|
||||
* `getID(): int`
|
||||
* `getDatacenterID(): string`
|
||||
* `getCtx(): \danog\MadelineProto\Stream\ConnectionContext`
|
||||
* `isHttp(): bool`
|
||||
* `isMedia(): bool`
|
||||
* `isCDN(): bool`
|
||||
* `connect(\danog\MadelineProto\Stream\ConnectionContext $ctx): \Generator`
|
||||
* `sendMessage(array $message, bool $flush): \Generator`
|
||||
* `flush(): void`
|
||||
* `pingHttpWaiter(): void`
|
||||
* `setExtra(\danog\MadelineProto\DataCenterConnection $extra, int $id): void`
|
||||
* `getExtra(): \danog\MadelineProto\MTProto`
|
||||
* `getShared(): \danog\MadelineProto\DataCenterConnection`
|
||||
* `disconnect(bool $temporary): void`
|
||||
* `reconnect(): \Generator`
|
||||
* `getName(): string`
|
||||
* `resetSession(): void`
|
||||
* `createSession(): void`
|
||||
* `backupSession(): array`
|
||||
* `ackOutgoingMessageId(string|int $message_id): bool`
|
||||
* `gotResponseForOutgoingMessageId(string|int $message_id): bool`
|
||||
* `ackIncomingMessageId(string|int $message_id): bool`
|
||||
* `hasPendingCalls(): bool`
|
||||
* `getPendingCalls(): array`
|
||||
* `handleReject(array $request, \Throwable $data): void`
|
||||
* `handleResponse(): void`
|
||||
* `methodRecall(string $watcherId, array $args): void`
|
||||
* `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
* `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
* `objectCall(string $object, array $args, array $aargs): \Generator`
|
||||
* `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `needReconnect(bool $needsReconnect): void`
|
||||
|
||||
Indicate if this socket needs to be reconnected.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$needsReconnect`: `bool` Whether the socket has to be reconnected
|
||||
|
||||
|
||||
|
||||
### `shouldReconnect(): bool`
|
||||
|
||||
Whether this sockets needs to be reconnected.
|
||||
|
||||
|
||||
|
||||
### `writing(bool $writing): void`
|
||||
|
||||
Set writing boolean.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$writing`: `bool`
|
||||
|
||||
|
||||
|
||||
### `reading(bool $reading): void`
|
||||
|
||||
Set reading boolean.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$reading`: `bool`
|
||||
|
||||
|
||||
|
||||
### `haveRead(): void`
|
||||
|
||||
Tell the class that we have read a chunk of data from the socket.
|
||||
|
||||
|
||||
|
||||
### `getLastChunk(): float`
|
||||
|
||||
Get the receive date of the latest chunk of data from the socket.
|
||||
|
||||
|
||||
|
||||
### `httpReceived(): void`
|
||||
|
||||
Indicate a received HTTP response.
|
||||
|
||||
|
||||
|
||||
### `countHttpReceived(): int`
|
||||
|
||||
Count received HTTP responses.
|
||||
|
||||
|
||||
|
||||
### `httpSent(): void`
|
||||
|
||||
Indicate a sent HTTP request.
|
||||
|
||||
|
||||
|
||||
### `countHttpSent(): int`
|
||||
|
||||
Count sent HTTP requests.
|
||||
|
||||
|
||||
|
||||
### `getID(): int`
|
||||
|
||||
Get connection ID.
|
||||
|
||||
|
||||
|
||||
### `getDatacenterID(): string`
|
||||
|
||||
Get datacenter concatenated with connection ID.
|
||||
|
||||
|
||||
|
||||
### `getCtx(): \danog\MadelineProto\Stream\ConnectionContext`
|
||||
|
||||
Get connection context.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Stream\ConnectionContext`: Connection context class.](./Stream/ConnectionContext.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `isHttp(): bool`
|
||||
|
||||
Check if is an HTTP connection.
|
||||
|
||||
|
||||
|
||||
### `isMedia(): bool`
|
||||
|
||||
Check if is a media connection.
|
||||
|
||||
|
||||
|
||||
### `isCDN(): bool`
|
||||
|
||||
Check if is a CDN connection.
|
||||
|
||||
|
||||
|
||||
### `connect(\danog\MadelineProto\Stream\ConnectionContext $ctx): \Generator`
|
||||
|
||||
Connects to a telegram DC using the specified protocol, proxy and connection parameters.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$ctx`: `\danog\MadelineProto\Stream\ConnectionContext` Connection context
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<mixed, \danog\MadelineProto\Stream\StreamInterface, mixed, void>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Stream\ConnectionContext`: Connection context class.](./Stream/ConnectionContext.md)
|
||||
* [`\danog\MadelineProto\Stream\StreamInterface`: Generic stream interface.](./Stream/StreamInterface.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `sendMessage(array $message, bool $flush): \Generator`
|
||||
|
||||
Send an MTProto message.
|
||||
Structure of message array:
|
||||
[
|
||||
// only in outgoing messages
|
||||
'body' => deserialized body, (optional if container)
|
||||
'serialized_body' => 'serialized body', (optional if container)
|
||||
'contentRelated' => bool,
|
||||
'_' => 'predicate',
|
||||
'promise' => deferred promise that gets resolved when a response to the message is received (optional),
|
||||
'send_promise' => deferred promise that gets resolved when the message is sent (optional),
|
||||
'file' => bool (optional),
|
||||
'type' => 'type' (optional),
|
||||
'queue' => queue ID (optional),
|
||||
'container' => [message ids] (optional),
|
||||
|
||||
// only in incoming messages
|
||||
'content' => deserialized body,
|
||||
'seq_no' => number (optional),
|
||||
'from_container' => bool (optional),
|
||||
|
||||
// can be present in both
|
||||
'response' => message id (optional),
|
||||
'msg_id' => message id (optional),
|
||||
'sent' => timestamp,
|
||||
'tries' => number
|
||||
]
|
||||
|
||||
Parameters:
|
||||
* `$message`: `array` The message to send
|
||||
* `$flush`: `bool` Whether to flush the message right away
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `flush(): void`
|
||||
|
||||
Flush pending packets.
|
||||
|
||||
|
||||
|
||||
### `pingHttpWaiter(): void`
|
||||
|
||||
Resume HttpWaiter.
|
||||
|
||||
|
||||
|
||||
### `setExtra(\danog\MadelineProto\DataCenterConnection $extra, int $id): void`
|
||||
|
||||
Connect main instance.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$extra`: `\danog\MadelineProto\DataCenterConnection` Shared instance
|
||||
* `$id`: `int` Connection ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\DataCenterConnection`: Datacenter connection.](./DataCenterConnection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getExtra(): \danog\MadelineProto\MTProto`
|
||||
|
||||
Get main instance.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto`: Manages all of the mtproto stuff.](./MTProto.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getShared(): \danog\MadelineProto\DataCenterConnection`
|
||||
|
||||
Get shared connection instance.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\DataCenterConnection`: Datacenter connection.](./DataCenterConnection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `disconnect(bool $temporary): void`
|
||||
|
||||
Disconnect from DC.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$temporary`: `bool` Whether the disconnection is temporary, triggered by the reconnect method
|
||||
|
||||
|
||||
|
||||
### `reconnect(): \Generator`
|
||||
|
||||
Reconnect to DC.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getName(): string`
|
||||
|
||||
Get name.
|
||||
|
||||
|
||||
|
||||
### `resetSession(): void`
|
||||
|
||||
Reset MTProto session.
|
||||
|
||||
|
||||
|
||||
### `createSession(): void`
|
||||
|
||||
Create MTProto session if needed.
|
||||
|
||||
|
||||
|
||||
### `backupSession(): array`
|
||||
|
||||
Backup eventual unsent messages before session deletion.
|
||||
|
||||
|
||||
|
||||
### `ackOutgoingMessageId(string|int $message_id): bool`
|
||||
|
||||
Acknowledge outgoing message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message_id`: `string|int` Message Id
|
||||
|
||||
|
||||
|
||||
### `gotResponseForOutgoingMessageId(string|int $message_id): bool`
|
||||
|
||||
We have gotten response for outgoing message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message_id`: `string|int` Message ID
|
||||
|
||||
|
||||
|
||||
### `ackIncomingMessageId(string|int $message_id): bool`
|
||||
|
||||
Acknowledge incoming message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message_id`: `string|int` Message ID
|
||||
|
||||
|
||||
|
||||
### `hasPendingCalls(): bool`
|
||||
|
||||
Check if there are some pending calls.
|
||||
|
||||
|
||||
|
||||
### `getPendingCalls(): array`
|
||||
|
||||
Get all pending calls (also clear pending state requests).
|
||||
|
||||
|
||||
|
||||
### `handleReject(array $request, \Throwable $data): void`
|
||||
|
||||
Reject request with exception.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$request`: `array` Request
|
||||
* `$data`: `\Throwable` Exception
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `handleResponse(): void`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### `methodRecall(string $watcherId, array $args): void`
|
||||
|
||||
Recall method.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$watcherId`: `string` Watcher ID for defer
|
||||
* `$args`: `array` Args
|
||||
|
||||
|
||||
|
||||
### `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
|
||||
Call method and wait asynchronously for response.
|
||||
If the $aargs['noResponse'] is true, will not wait for a response.
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` Method name
|
||||
* `$args`: `array|\Generator` Arguments
|
||||
Full type:
|
||||
```
|
||||
array|\Generator<mixed, mixed, mixed, array>
|
||||
```
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
|
||||
Call method and make sure it is asynchronously sent (generator).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` Method name
|
||||
* `$args`: `array|\Generator` Arguments
|
||||
Full type:
|
||||
```
|
||||
array|\Generator<mixed, mixed, mixed, array>
|
||||
```
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `objectCall(string $object, array $args, array $aargs): \Generator`
|
||||
|
||||
Send object and make sure it is asynchronously sent (generator).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$object`: `string` Object name
|
||||
* `$args`: `array` Arguments
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator`
|
||||
|
||||
Send state info for message IDs.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$req_msg_id`: `string|int` Message ID of msgs_state_req that initiated this
|
||||
* `$msg_ids`: `array` Message IDs to send info about
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
85
docs/PHP/danog/MadelineProto/Coroutine.md
Normal file
85
docs/PHP/danog/MadelineProto/Coroutine.md
Normal file
@ -0,0 +1,85 @@
|
||||
---
|
||||
title: danog\MadelineProto\Coroutine: Creates a promise from a generator function yielding promises.
|
||||
description: When a promise is yielded, execution of the generator is interrupted until the promise is resolved. A success
|
||||
value is sent into the generator, while a failure reason is thrown into the generator. Using a coroutine,
|
||||
asynchronous code can be written without callbacks and be structured like synchronous code.
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Coroutine`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Creates a promise from a generator function yielding promises.
|
||||
|
||||
When a promise is yielded, execution of the generator is interrupted until the promise is resolved. A success
|
||||
value is sent into the generator, while a failure reason is thrown into the generator. Using a coroutine,
|
||||
asynchronous code can be written without callbacks and be structured like synchronous code.
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `fail(\Throwable $reason): void`
|
||||
* `offsetGet(mixed $offset): \Amp\Promise`
|
||||
* `getTrace(): array`
|
||||
* `getFrame(): array`
|
||||
* `jsonSerialize(): string`
|
||||
* `onResolve()`
|
||||
|
||||
## Methods:
|
||||
### `fail(\Throwable $reason): void`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$reason`: `\Throwable` Failure reason.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetGet(mixed $offset): \Amp\Promise`
|
||||
|
||||
Get data at an array offset asynchronously.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$offset`: `mixed` Offset
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getTrace(): array`
|
||||
|
||||
Get current stack trace for running coroutine.
|
||||
|
||||
|
||||
|
||||
### `getFrame(): array`
|
||||
|
||||
Get current execution frame.
|
||||
|
||||
|
||||
|
||||
### `jsonSerialize(): string`
|
||||
|
||||
Obtain.
|
||||
|
||||
|
||||
|
||||
### `onResolve()`
|
||||
|
||||
|
||||
|
||||
|
||||
|
285
docs/PHP/danog/MadelineProto/DataCenter.md
Normal file
285
docs/PHP/danog/MadelineProto/DataCenter.md
Normal file
@ -0,0 +1,285 @@
|
||||
---
|
||||
title: danog\MadelineProto\DataCenter: Manages datacenters.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\DataCenter`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages datacenters.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `setDataCenterConnections(array $saved): void`
|
||||
* `setVoIPEndpoints(array $endpoints): void`
|
||||
* `dcConnect(string $dc_number, int $id): \Generator<bool>`
|
||||
* `generateContexts(int $dc_number, string $uri, \Amp\Socket\ConnectContext $context): array`
|
||||
* `getAPI(): \danog\MadelineProto\MTProto`
|
||||
* `getHTTPClient(): \Amp\Http\Client\HttpClient`
|
||||
* `getCookieJar(): \Amp\Http\Client\Cookie\CookieJar`
|
||||
* `getDNSClient(): \Amp\Dns\Resolver`
|
||||
* `getNonProxiedDNSClient(): \Amp\Dns\Resolver`
|
||||
* `fileGetContents(string $url): \Generator`
|
||||
* `getAuthConnection(string $dc): \danog\MadelineProto\Connection`
|
||||
* `getConnection(string $dc): \danog\MadelineProto\Connection`
|
||||
* `waitGetConnection(string $dc): \Generator`
|
||||
* `getDataCenterConnection(string $dc): \danog\MadelineProto\DataCenterConnection`
|
||||
* `getDataCenterConnections(): array<int|string, \danog\MadelineProto\DataCenterConnection>`
|
||||
* `has(string $dc): bool`
|
||||
* `isHttp(string $datacenter): bool`
|
||||
* `byIPAddress(string $datacenter): bool`
|
||||
* `getDcs(bool $all): array`
|
||||
|
||||
## Methods:
|
||||
### `setDataCenterConnections(array $saved): void`
|
||||
|
||||
Set auth key information from saved auth array.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$saved`: `array` Saved auth array
|
||||
|
||||
|
||||
|
||||
### `setVoIPEndpoints(array $endpoints): void`
|
||||
|
||||
Set VoIP endpoints.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$endpoints`: `array` Endpoints
|
||||
|
||||
|
||||
|
||||
### `dcConnect(string $dc_number, int $id): \Generator<bool>`
|
||||
|
||||
Connect to specified DC.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dc_number`: `string` DC to connect to
|
||||
* `$id`: `int` Connection ID to re-establish (optional)
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `generateContexts(int $dc_number, string $uri, \Amp\Socket\ConnectContext $context): array`
|
||||
|
||||
Generate contexts.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dc_number`: `int` DC ID to generate contexts for
|
||||
* `$uri`: `string` URI
|
||||
* `$context`: `\Amp\Socket\ConnectContext` Connection context
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Socket\ConnectContext`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getAPI(): \danog\MadelineProto\MTProto`
|
||||
|
||||
Get main API.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto`: Manages all of the mtproto stuff.](./MTProto.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getHTTPClient(): \Amp\Http\Client\HttpClient`
|
||||
|
||||
Get async HTTP client.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Http\Client\HttpClient`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getCookieJar(): \Amp\Http\Client\Cookie\CookieJar`
|
||||
|
||||
Get async HTTP client cookies.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Http\Client\Cookie\CookieJar`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getDNSClient(): \Amp\Dns\Resolver`
|
||||
|
||||
Get DNS over HTTPS async DNS client.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Dns\Resolver`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getNonProxiedDNSClient(): \Amp\Dns\Resolver`
|
||||
|
||||
Get non-proxied DNS over HTTPS async DNS client.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Dns\Resolver`
|
||||
|
||||
|
||||
|
||||
|
||||
### `fileGetContents(string $url): \Generator`
|
||||
|
||||
Get contents of file.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$url`: `string` URL to fetch
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise<string>, mixed, string>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getAuthConnection(string $dc): \danog\MadelineProto\Connection`
|
||||
|
||||
Get Connection instance for authorization.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dc`: `string` DC ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getConnection(string $dc): \danog\MadelineProto\Connection`
|
||||
|
||||
Get Connection instance.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dc`: `string` DC ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitGetConnection(string $dc): \Generator`
|
||||
|
||||
Get Connection instance asynchronously.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dc`: `string` DC ID
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise, mixed, \danog\MadelineProto\Connection>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getDataCenterConnection(string $dc): \danog\MadelineProto\DataCenterConnection`
|
||||
|
||||
Get DataCenterConnection instance.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dc`: `string` DC ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\DataCenterConnection`: Datacenter connection.](./DataCenterConnection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getDataCenterConnections(): array<int|string, \danog\MadelineProto\DataCenterConnection>`
|
||||
|
||||
Get all DataCenterConnection instances.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\DataCenterConnection`: Datacenter connection.](./DataCenterConnection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `has(string $dc): bool`
|
||||
|
||||
Check if a DC is present.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dc`: `string` DC ID
|
||||
|
||||
|
||||
|
||||
### `isHttp(string $datacenter): bool`
|
||||
|
||||
Check if connected to datacenter using HTTP.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$datacenter`: `string` DC ID
|
||||
|
||||
|
||||
|
||||
### `byIPAddress(string $datacenter): bool`
|
||||
|
||||
Check if connected to datacenter directly using IP address.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$datacenter`: `string` DC ID
|
||||
|
||||
|
||||
|
||||
### `getDcs(bool $all): array`
|
||||
|
||||
Get all DC IDs.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$all`: `bool` Whether to get all possible DC IDs, or only connected ones
|
||||
|
||||
|
||||
|
478
docs/PHP/danog/MadelineProto/DataCenterConnection.md
Normal file
478
docs/PHP/danog/MadelineProto/DataCenterConnection.md
Normal file
@ -0,0 +1,478 @@
|
||||
---
|
||||
title: danog\MadelineProto\DataCenterConnection: Datacenter connection.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\DataCenterConnection`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Datacenter connection.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* danog\MadelineProto\DataCenterConnection::READ_WEIGHT:
|
||||
|
||||
* danog\MadelineProto\DataCenterConnection::READ_WEIGHT_MEDIA:
|
||||
|
||||
* danog\MadelineProto\DataCenterConnection::WRITE_WEIGHT:
|
||||
|
||||
|
||||
## Method list:
|
||||
* `needReconnect(bool $needsReconnect): void`
|
||||
* `shouldReconnect(): bool`
|
||||
* `getAuthKey(bool $temp): \danog\MadelineProto\MTProto\AuthKey`
|
||||
* `hasAuthKey(bool $temp): bool`
|
||||
* `setAuthKey(\danog\MadelineProto\MTProto\AuthKey|null $key, bool $temp): void`
|
||||
* `getTempAuthKey(): \danog\MadelineProto\MTProto\TempAuthKey`
|
||||
* `getPermAuthKey(): \danog\MadelineProto\MTProto\PermAuthKey`
|
||||
* `hasTempAuthKey(): bool`
|
||||
* `hasPermAuthKey(): bool`
|
||||
* `setTempAuthKey(\danog\MadelineProto\MTProto\TempAuthKey|null $key): void`
|
||||
* `setPermAuthKey(\danog\MadelineProto\MTProto\PermAuthKey|null $key): void`
|
||||
* `bind(bool $pfs): void`
|
||||
* `isBound(): bool`
|
||||
* `isAuthorized(): bool`
|
||||
* `authorized(bool $authorized): void`
|
||||
* `link(string $dc): void`
|
||||
* `resetSession(): void`
|
||||
* `createSession(): void`
|
||||
* `flush(): void`
|
||||
* `getCtx(): \danog\MadelineProto\Stream\ConnectionContext`
|
||||
* `hasCtx(): bool`
|
||||
* `connect(\danog\MadelineProto\Stream\ConnectionContext $ctx, int $id): \Generator`
|
||||
* `signalDisconnect(int $id): void`
|
||||
* `disconnect(): void`
|
||||
* `reconnect(): \Generator`
|
||||
* `restoreBackup(): void`
|
||||
* `getAuthConnection(): \danog\MadelineProto\Connection`
|
||||
* `hasConnection(int $id): bool|int`
|
||||
* `waitGetConnection(): \Generator`
|
||||
* `getConnection(int $id): \danog\MadelineProto\Connection`
|
||||
* `even(): void`
|
||||
* `reading(bool $reading, int $x): void`
|
||||
* `writing(bool $writing, int $x): void`
|
||||
* `setExtra(\danog\MadelineProto\MTProto $API): void`
|
||||
* `getExtra(): \danog\MadelineProto\MTProto`
|
||||
* `isHttp(): bool`
|
||||
* `byIPAddress(): bool`
|
||||
* `isMedia(): bool`
|
||||
* `isCDN(): bool`
|
||||
* `getSettings(): \danog\MadelineProto\Settings\Connection`
|
||||
* `getGenericSettings(): \danog\MadelineProto\Settings`
|
||||
* `jsonSerialize(): array`
|
||||
|
||||
## Methods:
|
||||
### `needReconnect(bool $needsReconnect): void`
|
||||
|
||||
Indicate if this socket needs to be reconnected.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$needsReconnect`: `bool` Whether the socket has to be reconnected
|
||||
|
||||
|
||||
|
||||
### `shouldReconnect(): bool`
|
||||
|
||||
Whether this sockets needs to be reconnected.
|
||||
|
||||
|
||||
|
||||
### `getAuthKey(bool $temp): \danog\MadelineProto\MTProto\AuthKey`
|
||||
|
||||
Get auth key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$temp`: `bool` Whether to fetch the temporary auth key
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto\AuthKey`: MTProto auth key.](./MTProto/AuthKey.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `hasAuthKey(bool $temp): bool`
|
||||
|
||||
Check if auth key is present.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$temp`: `bool`
|
||||
|
||||
|
||||
|
||||
### `setAuthKey(\danog\MadelineProto\MTProto\AuthKey|null $key, bool $temp): void`
|
||||
|
||||
Set auth key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: `\danog\MadelineProto\MTProto\AuthKey|null` The auth key
|
||||
* `$temp`: `bool`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto\AuthKey`: MTProto auth key.](./MTProto/AuthKey.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getTempAuthKey(): \danog\MadelineProto\MTProto\TempAuthKey`
|
||||
|
||||
Get temporary authorization key.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto\TempAuthKey`: MTProto temporary auth key.](./MTProto/TempAuthKey.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getPermAuthKey(): \danog\MadelineProto\MTProto\PermAuthKey`
|
||||
|
||||
Get permanent authorization key.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto\PermAuthKey`: MTProto permanent auth key.](./MTProto/PermAuthKey.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `hasTempAuthKey(): bool`
|
||||
|
||||
Check if has temporary authorization key.
|
||||
|
||||
|
||||
|
||||
### `hasPermAuthKey(): bool`
|
||||
|
||||
Check if has permanent authorization key.
|
||||
|
||||
|
||||
|
||||
### `setTempAuthKey(\danog\MadelineProto\MTProto\TempAuthKey|null $key): void`
|
||||
|
||||
Set temporary authorization key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: `\danog\MadelineProto\MTProto\TempAuthKey|null` Auth key
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto\TempAuthKey`: MTProto temporary auth key.](./MTProto/TempAuthKey.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setPermAuthKey(\danog\MadelineProto\MTProto\PermAuthKey|null $key): void`
|
||||
|
||||
Set permanent authorization key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: `\danog\MadelineProto\MTProto\PermAuthKey|null` Auth key
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto\PermAuthKey`: MTProto permanent auth key.](./MTProto/PermAuthKey.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `bind(bool $pfs): void`
|
||||
|
||||
Bind temporary and permanent auth keys.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$pfs`: `bool` Whether to bind using PFS
|
||||
|
||||
|
||||
|
||||
### `isBound(): bool`
|
||||
|
||||
Check if auth keys are bound.
|
||||
|
||||
|
||||
|
||||
### `isAuthorized(): bool`
|
||||
|
||||
Check if we are logged in.
|
||||
|
||||
|
||||
|
||||
### `authorized(bool $authorized): void`
|
||||
|
||||
Set the authorized boolean.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$authorized`: `bool` Whether we are authorized
|
||||
|
||||
|
||||
|
||||
### `link(string $dc): void`
|
||||
|
||||
Link permanent authorization info of main DC to media DC.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dc`: `string` Main DC ID
|
||||
|
||||
|
||||
|
||||
### `resetSession(): void`
|
||||
|
||||
Reset MTProto sessions.
|
||||
|
||||
|
||||
|
||||
### `createSession(): void`
|
||||
|
||||
Create MTProto sessions if needed.
|
||||
|
||||
|
||||
|
||||
### `flush(): void`
|
||||
|
||||
Flush all pending packets.
|
||||
|
||||
|
||||
|
||||
### `getCtx(): \danog\MadelineProto\Stream\ConnectionContext`
|
||||
|
||||
Get connection context.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Stream\ConnectionContext`: Connection context class.](./Stream/ConnectionContext.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `hasCtx(): bool`
|
||||
|
||||
Has connection context?
|
||||
|
||||
|
||||
|
||||
### `connect(\danog\MadelineProto\Stream\ConnectionContext $ctx, int $id): \Generator`
|
||||
|
||||
Connect function.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$ctx`: `\danog\MadelineProto\Stream\ConnectionContext` Connection context
|
||||
* `$id`: `int` Optional connection ID to reconnect
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Stream\ConnectionContext`: Connection context class.](./Stream/ConnectionContext.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `signalDisconnect(int $id): void`
|
||||
|
||||
Signal that a connection ID disconnected.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `int` Connection ID
|
||||
|
||||
|
||||
|
||||
### `disconnect(): void`
|
||||
|
||||
Close all connections to DC.
|
||||
|
||||
|
||||
|
||||
### `reconnect(): \Generator`
|
||||
|
||||
Reconnect to DC.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `restoreBackup(): void`
|
||||
|
||||
Restore backed up messages.
|
||||
|
||||
|
||||
|
||||
### `getAuthConnection(): \danog\MadelineProto\Connection`
|
||||
|
||||
Get connection for authorization.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `hasConnection(int $id): bool|int`
|
||||
|
||||
Check if any connection is available.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `int` Connection ID
|
||||
|
||||
|
||||
|
||||
### `waitGetConnection(): \Generator`
|
||||
|
||||
Get best socket in round robin, asynchronously.
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise, mixed, \danog\MadelineProto\Connection>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getConnection(int $id): \danog\MadelineProto\Connection`
|
||||
|
||||
Get best socket in round robin.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `int` Connection ID, for manual fetching
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `even(): void`
|
||||
|
||||
Even out round robin values.
|
||||
|
||||
|
||||
|
||||
### `reading(bool $reading, int $x): void`
|
||||
|
||||
Indicate that one of the sockets is busy reading.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$reading`: `bool` Whether we're busy reading
|
||||
* `$x`: `int` Connection ID
|
||||
|
||||
|
||||
|
||||
### `writing(bool $writing, int $x): void`
|
||||
|
||||
Indicate that one of the sockets is busy writing.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$writing`: `bool` Whether we're busy writing
|
||||
* `$x`: `int` Connection ID
|
||||
|
||||
|
||||
|
||||
### `setExtra(\danog\MadelineProto\MTProto $API): void`
|
||||
|
||||
Set main instance.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$API`: `\danog\MadelineProto\MTProto` Main instance
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto`: Manages all of the mtproto stuff.](./MTProto.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getExtra(): \danog\MadelineProto\MTProto`
|
||||
|
||||
Get main instance.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto`: Manages all of the mtproto stuff.](./MTProto.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `isHttp(): bool`
|
||||
|
||||
Check if is an HTTP connection.
|
||||
|
||||
|
||||
|
||||
### `byIPAddress(): bool`
|
||||
|
||||
Check if is connected directly by IP address.
|
||||
|
||||
|
||||
|
||||
### `isMedia(): bool`
|
||||
|
||||
Check if is a media connection.
|
||||
|
||||
|
||||
|
||||
### `isCDN(): bool`
|
||||
|
||||
Check if is a CDN connection.
|
||||
|
||||
|
||||
|
||||
### `getSettings(): \danog\MadelineProto\Settings\Connection`
|
||||
|
||||
Get DC-specific settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Connection`: Connection settings.](./Settings/Connection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getGenericSettings(): \danog\MadelineProto\Settings`
|
||||
|
||||
Get global settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings`: Settings class used for configuring MadelineProto.](./Settings.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `jsonSerialize(): array`
|
||||
|
||||
JSON serialize function.
|
||||
|
||||
|
||||
|
18
docs/PHP/danog/MadelineProto/Db/ArrayCacheTrait.md
Normal file
18
docs/PHP/danog/MadelineProto/Db/ArrayCacheTrait.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\ArrayCacheTrait: Array caching trait.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\ArrayCacheTrait`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Array caching trait.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
154
docs/PHP/danog/MadelineProto/Db/DbArray.md
Normal file
154
docs/PHP/danog/MadelineProto/Db/DbArray.md
Normal file
@ -0,0 +1,154 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\DbArray: DB array interface.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\DbArray`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
DB array interface.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getArrayCopy(): \Amp\Promise`
|
||||
* `isset(string|int $key): \Amp\Promise`
|
||||
* `offsetGet(string|int $index): \Amp\Promise`
|
||||
* `offsetSet(string|int $index, mixed $value): void`
|
||||
* `offsetUnset(string|int $index): \Amp\Promise`
|
||||
* `count(): \Amp\Promise<int>`
|
||||
* `getIterator()`
|
||||
* `getInstance(string $table, null|\danog\MadelineProto\Db\DbType|array $value, \danog\MadelineProto\Settings\DatabaseAbstract $settings): \Amp\Promise<self>`
|
||||
|
||||
## Methods:
|
||||
### `getArrayCopy(): \Amp\Promise`
|
||||
|
||||
Get Array copy.
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<array<string|int, \T>>
|
||||
```
|
||||
#### See also:
|
||||
* `\T`
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `isset(string|int $key): \Amp\Promise`
|
||||
|
||||
Check if element is set.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: `string|int`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<bool>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetGet(string|int $index): \Amp\Promise`
|
||||
|
||||
Get element.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<\T>
|
||||
```
|
||||
#### See also:
|
||||
* `\T`
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetSet(string|int $index, mixed $value): void`
|
||||
|
||||
Set element.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int`
|
||||
* `$value`: `mixed`
|
||||
Full type:
|
||||
```
|
||||
\T
|
||||
```
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetUnset(string|int $index): \Amp\Promise`
|
||||
|
||||
Unset element.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int` Offset
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `count(): \Amp\Promise<int>`
|
||||
|
||||
Count number of elements.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getIterator()`
|
||||
|
||||
Get iterator.
|
||||
|
||||
|
||||
|
||||
### `getInstance(string $table, null|\danog\MadelineProto\Db\DbType|array $value, \danog\MadelineProto\Settings\DatabaseAbstract $settings): \Amp\Promise<self>`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `null|\danog\MadelineProto\Db\DbType|array`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\DatabaseAbstract`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\DatabaseAbstract`: Base class for storage backends.](../Settings/DatabaseAbstract.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
23
docs/PHP/danog/MadelineProto/Db/DbPropertiesFactory.md
Normal file
23
docs/PHP/danog/MadelineProto/Db/DbPropertiesFactory.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\DbPropertiesFactory: This factory class initializes the correct database backend for MadelineProto.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\DbPropertiesFactory`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
This factory class initializes the correct database backend for MadelineProto.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* `danog\MadelineProto\Db\DbPropertiesFactory::TYPE_ARRAY`: Indicates a simple K-V array stored in a database backend.
|
||||
|
||||
Values can be objects or other arrays, but when lots of nesting is required, it's best to split the array into multiple arrays.
|
||||
|
24
docs/PHP/danog/MadelineProto/Db/DbPropertiesTrait.md
Normal file
24
docs/PHP/danog/MadelineProto/Db/DbPropertiesTrait.md
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\DbPropertiesTrait: Include this trait and call DbPropertiesTrait::initDb to use MadelineProto's database backend for properties.
|
||||
description: You will have to define a `$dbProperties` static array property, with a list of properties you want to store to a database.
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\DbPropertiesTrait`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Include this trait and call DbPropertiesTrait::initDb to use MadelineProto's database backend for properties.
|
||||
|
||||
You will have to define a `$dbProperties` static array property, with a list of properties you want to store to a database.
|
||||
|
||||
#### See also:
|
||||
* [For a list of allowed property types](./DbPropertiesFactory.md)
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it). ## Properties
|
||||
* `$dbProperties`: `array<string, DbPropertiesFactory::TYPE_*>`
|
44
docs/PHP/danog/MadelineProto/Db/Driver/Mysql.md
Normal file
44
docs/PHP/danog/MadelineProto/Db/Driver/Mysql.md
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\Driver\Mysql: MySQL driver wrapper.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\Driver\Mysql`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
MySQL driver wrapper.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getConnection(string $host, int $port, string $user, string $password, string $db, int $maxConnections, int $idleTimeout): \Generator<\Amp\Mysql\Pool>`
|
||||
|
||||
## Methods:
|
||||
### `getConnection(string $host, int $port, string $user, string $password, string $db, int $maxConnections, int $idleTimeout): \Generator<\Amp\Mysql\Pool>`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$host`: `string`
|
||||
* `$port`: `int`
|
||||
* `$user`: `string`
|
||||
* `$password`: `string`
|
||||
* `$db`: `string`
|
||||
* `$maxConnections`: `int`
|
||||
* `$idleTimeout`: `int`
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Mysql\Pool`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
44
docs/PHP/danog/MadelineProto/Db/Driver/Postgres.md
Normal file
44
docs/PHP/danog/MadelineProto/Db/Driver/Postgres.md
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\Driver\Postgres: Postgres driver wrapper.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\Driver\Postgres`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Postgres driver wrapper.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getConnection(string $host, int $port, string $user, string $password, string $db, int $maxConnections, int $idleTimeout): \Generator<\Amp\Postgres\Pool>`
|
||||
|
||||
## Methods:
|
||||
### `getConnection(string $host, int $port, string $user, string $password, string $db, int $maxConnections, int $idleTimeout): \Generator<\Amp\Postgres\Pool>`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$host`: `string`
|
||||
* `$port`: `int`
|
||||
* `$user`: `string`
|
||||
* `$password`: `string`
|
||||
* `$db`: `string`
|
||||
* `$maxConnections`: `int`
|
||||
* `$idleTimeout`: `int`
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Postgres\Pool`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
49
docs/PHP/danog/MadelineProto/Db/Driver/Redis.md
Normal file
49
docs/PHP/danog/MadelineProto/Db/Driver/Redis.md
Normal file
@ -0,0 +1,49 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\Driver\Redis: Redis driver wrapper.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\Driver\Redis`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Redis driver wrapper.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getConnection(string $host, int $port, string $user, string $password, string $db, int $maxConnections, int $idleTimeout): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `getConnection(string $host, int $port, string $user, string $password, string $db, int $maxConnections, int $idleTimeout): \Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$host`: `string`
|
||||
* `$port`: `int`
|
||||
* `$user`: `string`
|
||||
* `$password`: `string`
|
||||
* `$db`: `string`
|
||||
* `$maxConnections`: `int`
|
||||
* `$idleTimeout`: `int`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise<void>, mixed, \Amp\Redis\Redis>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* `\Amp\Redis\Redis`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
154
docs/PHP/danog/MadelineProto/Db/DriverArray.md
Normal file
154
docs/PHP/danog/MadelineProto/Db/DriverArray.md
Normal file
@ -0,0 +1,154 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\DriverArray: Array caching trait.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\DriverArray`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Array caching trait.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getArrayCopy(): \Amp\Promise`
|
||||
* `isset(string|int $key): \Amp\Promise`
|
||||
* `offsetGet(string|int $index): \Amp\Promise`
|
||||
* `offsetSet(string|int $index, mixed $value): void`
|
||||
* `offsetUnset(string|int $index): \Amp\Promise`
|
||||
* `count(): \Amp\Promise<int>`
|
||||
* `getIterator()`
|
||||
* `getInstance(string $table, null|\danog\MadelineProto\Db\DbType|array $value, \danog\MadelineProto\Settings\DatabaseAbstract $settings): \Amp\Promise<self>`
|
||||
|
||||
## Methods:
|
||||
### `getArrayCopy(): \Amp\Promise`
|
||||
|
||||
Get Array copy.
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<array<string|int, \T>>
|
||||
```
|
||||
#### See also:
|
||||
* `\T`
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `isset(string|int $key): \Amp\Promise`
|
||||
|
||||
Check if element is set.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: `string|int`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<bool>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetGet(string|int $index): \Amp\Promise`
|
||||
|
||||
Get element.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<\T>
|
||||
```
|
||||
#### See also:
|
||||
* `\T`
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetSet(string|int $index, mixed $value): void`
|
||||
|
||||
Set element.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int`
|
||||
* `$value`: `mixed`
|
||||
Full type:
|
||||
```
|
||||
\T
|
||||
```
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetUnset(string|int $index): \Amp\Promise`
|
||||
|
||||
Unset element.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int` Offset
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `count(): \Amp\Promise<int>`
|
||||
|
||||
Count number of elements.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getIterator()`
|
||||
|
||||
Get iterator.
|
||||
|
||||
|
||||
|
||||
### `getInstance(string $table, null|\danog\MadelineProto\Db\DbType|array $value, \danog\MadelineProto\Settings\DatabaseAbstract $settings): \Amp\Promise<self>`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `null|\danog\MadelineProto\Db\DbType|array`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\DatabaseAbstract`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\DatabaseAbstract`: Base class for storage backends.](../Settings/DatabaseAbstract.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
46
docs/PHP/danog/MadelineProto/Db/MemoryArray.md
Normal file
46
docs/PHP/danog/MadelineProto/Db/MemoryArray.md
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\MemoryArray: Memory database backend.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\MemoryArray`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Memory database backend.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* `danog\MadelineProto\Db\MemoryArray::STD_PROP_LIST`:
|
||||
|
||||
* `danog\MadelineProto\Db\MemoryArray::ARRAY_AS_PROPS`:
|
||||
|
||||
|
||||
## Method list:
|
||||
* `getInstance(string $table, mixed $value, \danog\MadelineProto\Settings\Database\Memory $settings): \Amp\Promise<self>`
|
||||
|
||||
## Methods:
|
||||
### `getInstance(string $table, mixed $value, \danog\MadelineProto\Settings\Database\Memory $settings): \Amp\Promise<self>`
|
||||
|
||||
Get instance.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `mixed`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\Memory`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Database\Memory`: Memory backend settings.](../Settings/Database/Memory.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
131
docs/PHP/danog/MadelineProto/Db/MysqlArray.md
Normal file
131
docs/PHP/danog/MadelineProto/Db/MysqlArray.md
Normal file
@ -0,0 +1,131 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\MysqlArray: MySQL database backend.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\MysqlArray`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
MySQL database backend.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `initStartup(): \Generator`
|
||||
* `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
* `offsetSet(string|int $index, $value)`
|
||||
* `offsetUnset(string|int $index): \Amp\Promise`
|
||||
* `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
* `initConnection(\danog\MadelineProto\Settings\Database\Mysql $settings): \Generator`
|
||||
* `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
## Methods:
|
||||
### `initStartup(): \Generator`
|
||||
|
||||
Initialize on startup.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
|
||||
Check if key isset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: ``
|
||||
|
||||
|
||||
Return value: true if the offset exists, otherwise false
|
||||
|
||||
|
||||
### `offsetSet(string|int $index, $value)`
|
||||
|
||||
Set value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int` <p>
|
||||
The index to set for.
|
||||
</p>
|
||||
* `$value`: ``
|
||||
|
||||
|
||||
|
||||
### `offsetUnset(string|int $index): \Amp\Promise`
|
||||
|
||||
Unset value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int` <p>
|
||||
The offset to unset.
|
||||
</p>
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
|
||||
Count elements.
|
||||
|
||||
|
||||
Return value: The number of elements or public properties in the associated
|
||||
array or object, respectively.
|
||||
|
||||
|
||||
### `initConnection(\danog\MadelineProto\Settings\Database\Mysql $settings): \Generator`
|
||||
|
||||
Initialize connection.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\Mysql`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Database\Mysql`: MySQL backend settings.](../Settings/Database/Mysql.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `\danog\MadelineProto\Db\DbArray|array|null`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\DatabaseAbstract`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<static>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Db\DbArray`: DB array interface.](./DbArray.md)
|
||||
* [`\danog\MadelineProto\Settings\Database\DatabaseAbstract`: Base class for database backends.](../Settings/Database/DatabaseAbstract.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
131
docs/PHP/danog/MadelineProto/Db/NullCache/MysqlArray.md
Normal file
131
docs/PHP/danog/MadelineProto/Db/NullCache/MysqlArray.md
Normal file
@ -0,0 +1,131 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\NullCache\MysqlArray: MySQL database backend, no caching.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\NullCache\MysqlArray`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
MySQL database backend, no caching.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `initStartup(): \Generator`
|
||||
* `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
* `offsetSet(string|int $index, $value)`
|
||||
* `offsetUnset(string|int $index): \Amp\Promise`
|
||||
* `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
* `initConnection(\danog\MadelineProto\Settings\Database\Mysql $settings): \Generator`
|
||||
* `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
## Methods:
|
||||
### `initStartup(): \Generator`
|
||||
|
||||
Initialize on startup.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
|
||||
Check if key isset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: ``
|
||||
|
||||
|
||||
Return value: true if the offset exists, otherwise false
|
||||
|
||||
|
||||
### `offsetSet(string|int $index, $value)`
|
||||
|
||||
Set value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int` <p>
|
||||
The index to set for.
|
||||
</p>
|
||||
* `$value`: ``
|
||||
|
||||
|
||||
|
||||
### `offsetUnset(string|int $index): \Amp\Promise`
|
||||
|
||||
Unset value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int` <p>
|
||||
The offset to unset.
|
||||
</p>
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
|
||||
Count elements.
|
||||
|
||||
|
||||
Return value: The number of elements or public properties in the associated
|
||||
array or object, respectively.
|
||||
|
||||
|
||||
### `initConnection(\danog\MadelineProto\Settings\Database\Mysql $settings): \Generator`
|
||||
|
||||
Initialize connection.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\Mysql`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Database\Mysql`: MySQL backend settings.](../Settings/Database/Mysql.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `\danog\MadelineProto\Db\DbArray|array|null`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\DatabaseAbstract`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<static>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Db\DbArray`: DB array interface.](./DbArray.md)
|
||||
* [`\danog\MadelineProto\Settings\Database\DatabaseAbstract`: Base class for database backends.](../Settings/Database/DatabaseAbstract.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
143
docs/PHP/danog/MadelineProto/Db/NullCache/PostgresArray.md
Normal file
143
docs/PHP/danog/MadelineProto/Db/NullCache/PostgresArray.md
Normal file
@ -0,0 +1,143 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\NullCache\PostgresArray: Postgres database backend, no caching.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\NullCache\PostgresArray`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Postgres database backend, no caching.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `initStartup(): \Generator`
|
||||
* `initConnection(\danog\MadelineProto\Settings\Database\Postgres $settings): \Generator`
|
||||
* `offsetSet(string $index, $value)`
|
||||
* `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
* `offsetUnset(string $index): \Amp\Promise`
|
||||
* `getArrayCopy(): \Amp\Promise<array>`
|
||||
* `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
* `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
## Methods:
|
||||
### `initStartup(): \Generator`
|
||||
|
||||
Initialize on startup.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `initConnection(\danog\MadelineProto\Settings\Database\Postgres $settings): \Generator`
|
||||
|
||||
Initialize connection.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\Postgres`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Database\Postgres`: Postgres backend settings.](../Settings/Database/Postgres.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetSet(string $index, $value)`
|
||||
|
||||
Set value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string` <p>
|
||||
The index to set for.
|
||||
</p>
|
||||
* `$value`: ``
|
||||
|
||||
|
||||
|
||||
### `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
|
||||
Check if key isset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: ``
|
||||
|
||||
|
||||
Return value: true if the offset exists, otherwise false
|
||||
|
||||
|
||||
### `offsetUnset(string $index): \Amp\Promise`
|
||||
|
||||
Unset value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string` <p>
|
||||
The offset to unset.
|
||||
</p>
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getArrayCopy(): \Amp\Promise<array>`
|
||||
|
||||
Get array copy.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
|
||||
Count elements.
|
||||
|
||||
|
||||
Return value: The number of elements or public properties in the associated
|
||||
array or object, respectively.
|
||||
|
||||
|
||||
### `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `\danog\MadelineProto\Db\DbArray|array|null`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\DatabaseAbstract`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<static>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Db\DbArray`: DB array interface.](./DbArray.md)
|
||||
* [`\danog\MadelineProto\Settings\Database\DatabaseAbstract`: Base class for database backends.](../Settings/Database/DatabaseAbstract.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
143
docs/PHP/danog/MadelineProto/Db/NullCache/RedisArray.md
Normal file
143
docs/PHP/danog/MadelineProto/Db/NullCache/RedisArray.md
Normal file
@ -0,0 +1,143 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\NullCache\RedisArray: Redis database backend, no caching.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\NullCache\RedisArray`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Redis database backend, no caching.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `initStartup(): \Generator`
|
||||
* `initConnection(\danog\MadelineProto\Settings\Database\Redis $settings): \Generator`
|
||||
* `offsetSet(string $index, $value)`
|
||||
* `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
* `offsetUnset(string $index): \Amp\Promise`
|
||||
* `getArrayCopy(): \Amp\Promise<array>`
|
||||
* `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
* `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
## Methods:
|
||||
### `initStartup(): \Generator`
|
||||
|
||||
Initialize on startup.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `initConnection(\danog\MadelineProto\Settings\Database\Redis $settings): \Generator`
|
||||
|
||||
Initialize connection.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\Redis`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Database\Redis`: Redis backend settings.](../Settings/Database/Redis.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetSet(string $index, $value)`
|
||||
|
||||
Set value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string` <p>
|
||||
The index to set for.
|
||||
</p>
|
||||
* `$value`: ``
|
||||
|
||||
|
||||
|
||||
### `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
|
||||
Check if key isset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: ``
|
||||
|
||||
|
||||
Return value: true if the offset exists, otherwise false
|
||||
|
||||
|
||||
### `offsetUnset(string $index): \Amp\Promise`
|
||||
|
||||
Unset value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string` <p>
|
||||
The offset to unset.
|
||||
</p>
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getArrayCopy(): \Amp\Promise<array>`
|
||||
|
||||
Get array copy.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
|
||||
Count elements.
|
||||
|
||||
|
||||
Return value: The number of elements or public properties in the associated
|
||||
array or object, respectively.
|
||||
|
||||
|
||||
### `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `\danog\MadelineProto\Db\DbArray|array|null`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\DatabaseAbstract`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<static>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Db\DbArray`: DB array interface.](./DbArray.md)
|
||||
* [`\danog\MadelineProto\Settings\Database\DatabaseAbstract`: Base class for database backends.](../Settings/Database/DatabaseAbstract.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
143
docs/PHP/danog/MadelineProto/Db/PostgresArray.md
Normal file
143
docs/PHP/danog/MadelineProto/Db/PostgresArray.md
Normal file
@ -0,0 +1,143 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\PostgresArray: Postgres database backend.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\PostgresArray`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Postgres database backend.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `initStartup(): \Generator`
|
||||
* `initConnection(\danog\MadelineProto\Settings\Database\Postgres $settings): \Generator`
|
||||
* `offsetSet(string $index, $value)`
|
||||
* `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
* `offsetUnset(string $index): \Amp\Promise`
|
||||
* `getArrayCopy(): \Amp\Promise<array>`
|
||||
* `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
* `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
## Methods:
|
||||
### `initStartup(): \Generator`
|
||||
|
||||
Initialize on startup.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `initConnection(\danog\MadelineProto\Settings\Database\Postgres $settings): \Generator`
|
||||
|
||||
Initialize connection.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\Postgres`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Database\Postgres`: Postgres backend settings.](../Settings/Database/Postgres.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetSet(string $index, $value)`
|
||||
|
||||
Set value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string` <p>
|
||||
The index to set for.
|
||||
</p>
|
||||
* `$value`: ``
|
||||
|
||||
|
||||
|
||||
### `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
|
||||
Check if key isset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: ``
|
||||
|
||||
|
||||
Return value: true if the offset exists, otherwise false
|
||||
|
||||
|
||||
### `offsetUnset(string $index): \Amp\Promise`
|
||||
|
||||
Unset value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string` <p>
|
||||
The offset to unset.
|
||||
</p>
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getArrayCopy(): \Amp\Promise<array>`
|
||||
|
||||
Get array copy.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
|
||||
Count elements.
|
||||
|
||||
|
||||
Return value: The number of elements or public properties in the associated
|
||||
array or object, respectively.
|
||||
|
||||
|
||||
### `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `\danog\MadelineProto\Db\DbArray|array|null`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\DatabaseAbstract`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<static>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Db\DbArray`: DB array interface.](./DbArray.md)
|
||||
* [`\danog\MadelineProto\Settings\Database\DatabaseAbstract`: Base class for database backends.](../Settings/Database/DatabaseAbstract.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
143
docs/PHP/danog/MadelineProto/Db/RedisArray.md
Normal file
143
docs/PHP/danog/MadelineProto/Db/RedisArray.md
Normal file
@ -0,0 +1,143 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\RedisArray: Redis database backend.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\RedisArray`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Redis database backend.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `initStartup(): \Generator`
|
||||
* `initConnection(\danog\MadelineProto\Settings\Database\Redis $settings): \Generator`
|
||||
* `offsetSet(string $index, $value)`
|
||||
* `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
* `offsetUnset(string $index): \Amp\Promise`
|
||||
* `getArrayCopy(): \Amp\Promise<array>`
|
||||
* `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
* `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
## Methods:
|
||||
### `initStartup(): \Generator`
|
||||
|
||||
Initialize on startup.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `initConnection(\danog\MadelineProto\Settings\Database\Redis $settings): \Generator`
|
||||
|
||||
Initialize connection.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\Redis`
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Database\Redis`: Redis backend settings.](../Settings/Database/Redis.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetSet(string $index, $value)`
|
||||
|
||||
Set value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string` <p>
|
||||
The index to set for.
|
||||
</p>
|
||||
* `$value`: ``
|
||||
|
||||
|
||||
|
||||
### `isset( $key): \Promise<bool> true if the offset exists, otherwise false`
|
||||
|
||||
Check if key isset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: ``
|
||||
|
||||
|
||||
Return value: true if the offset exists, otherwise false
|
||||
|
||||
|
||||
### `offsetUnset(string $index): \Amp\Promise`
|
||||
|
||||
Unset value for an offset.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string` <p>
|
||||
The offset to unset.
|
||||
</p>
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getArrayCopy(): \Amp\Promise<array>`
|
||||
|
||||
Get array copy.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `count(): \Promise<int> The number of elements or public properties in the associated
|
||||
array or object, respectively.`
|
||||
|
||||
Count elements.
|
||||
|
||||
|
||||
Return value: The number of elements or public properties in the associated
|
||||
array or object, respectively.
|
||||
|
||||
|
||||
### `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `\danog\MadelineProto\Db\DbArray|array|null`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\DatabaseAbstract`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<static>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Db\DbArray`: DB array interface.](./DbArray.md)
|
||||
* [`\danog\MadelineProto\Settings\Database\DatabaseAbstract`: Base class for database backends.](../Settings/Database/DatabaseAbstract.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
159
docs/PHP/danog/MadelineProto/Db/SqlArray.md
Normal file
159
docs/PHP/danog/MadelineProto/Db/SqlArray.md
Normal file
@ -0,0 +1,159 @@
|
||||
---
|
||||
title: danog\MadelineProto\Db\SqlArray: Generic SQL database backend.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Db\SqlArray`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Generic SQL database backend.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
* `getArrayCopy(): \Amp\Promise`
|
||||
* `isset(string|int $key): \Amp\Promise`
|
||||
* `offsetGet(string|int $index): \Amp\Promise`
|
||||
* `offsetSet(string|int $index, mixed $value): void`
|
||||
* `offsetUnset(string|int $index): \Amp\Promise`
|
||||
* `count(): \Amp\Promise<int>`
|
||||
* `getIterator()`
|
||||
|
||||
## Methods:
|
||||
### `getInstance(string $table, \danog\MadelineProto\Db\DbArray|array|null $value, \danog\MadelineProto\Settings\Database\DatabaseAbstract $settings): \Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$table`: `string`
|
||||
* `$value`: `\danog\MadelineProto\Db\DbArray|array|null`
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Database\DatabaseAbstract`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<static>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Db\DbArray`: DB array interface.](./DbArray.md)
|
||||
* [`\danog\MadelineProto\Settings\Database\DatabaseAbstract`: Base class for database backends.](../Settings/Database/DatabaseAbstract.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getArrayCopy(): \Amp\Promise`
|
||||
|
||||
Get Array copy.
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<array<string|int, \T>>
|
||||
```
|
||||
#### See also:
|
||||
* `\T`
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `isset(string|int $key): \Amp\Promise`
|
||||
|
||||
Check if element is set.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$key`: `string|int`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<bool>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetGet(string|int $index): \Amp\Promise`
|
||||
|
||||
Get element.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int`
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<\T>
|
||||
```
|
||||
#### See also:
|
||||
* `\T`
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetSet(string|int $index, mixed $value): void`
|
||||
|
||||
Set element.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int`
|
||||
* `$value`: `mixed`
|
||||
Full type:
|
||||
```
|
||||
\T
|
||||
```
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
||||
### `offsetUnset(string|int $index): \Amp\Promise`
|
||||
|
||||
Unset element.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$index`: `string|int` Offset
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `count(): \Amp\Promise<int>`
|
||||
|
||||
Count number of elements.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getIterator()`
|
||||
|
||||
Get iterator.
|
||||
|
||||
|
||||
|
2713
docs/PHP/danog/MadelineProto/EventHandler.md
Normal file
2713
docs/PHP/danog/MadelineProto/EventHandler.md
Normal file
File diff suppressed because it is too large
Load Diff
87
docs/PHP/danog/MadelineProto/Exception.md
Normal file
87
docs/PHP/danog/MadelineProto/Exception.md
Normal file
@ -0,0 +1,87 @@
|
||||
---
|
||||
title: danog\MadelineProto\Exception: Basic exception.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Exception`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Basic exception.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `extension(string $extensionName): self`
|
||||
* `exceptionErrorHandler(): false`
|
||||
* `exceptionHandler(): void`
|
||||
* `updateTLTrace(array $trace): void`
|
||||
* `getTLTrace(): string`
|
||||
* `setTLTrace(string $tlTrace): void`
|
||||
* `prettifyTL(string $init, array $trace): void`
|
||||
|
||||
## Methods:
|
||||
### `extension(string $extensionName): self`
|
||||
|
||||
Complain about missing extensions.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$extensionName`: `string` Extension name
|
||||
|
||||
|
||||
|
||||
### `exceptionErrorHandler(): false`
|
||||
|
||||
ExceptionErrorHandler.
|
||||
Error handler
|
||||
|
||||
|
||||
### `exceptionHandler(): void`
|
||||
|
||||
ExceptionErrorHandler.
|
||||
Error handler
|
||||
|
||||
|
||||
### `updateTLTrace(array $trace): void`
|
||||
|
||||
Update TL trace.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$trace`: `array`
|
||||
|
||||
|
||||
|
||||
### `getTLTrace(): string`
|
||||
|
||||
Get TL trace.
|
||||
|
||||
|
||||
|
||||
### `setTLTrace(string $tlTrace): void`
|
||||
|
||||
Set TL trace.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$tlTrace`: `string` TL trace
|
||||
|
||||
|
||||
|
||||
### `prettifyTL(string $init, array $trace): void`
|
||||
|
||||
Generate async trace.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$init`: `string` Method name
|
||||
* `$trace`: `array` Async trace
|
||||
|
||||
|
||||
|
28
docs/PHP/danog/MadelineProto/FileCallback.md
Normal file
28
docs/PHP/danog/MadelineProto/FileCallback.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: danog\MadelineProto\FileCallback: File callback interface.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\FileCallback`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
File callback interface.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getFile(): mixed`
|
||||
|
||||
## Methods:
|
||||
### `getFile(): mixed`
|
||||
|
||||
Get file.
|
||||
|
||||
|
||||
|
28
docs/PHP/danog/MadelineProto/FileCallbackInterface.md
Normal file
28
docs/PHP/danog/MadelineProto/FileCallbackInterface.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: danog\MadelineProto\FileCallbackInterface: File callback interface.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\FileCallbackInterface`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
File callback interface.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getFile(): mixed`
|
||||
|
||||
## Methods:
|
||||
### `getFile(): mixed`
|
||||
|
||||
Get file.
|
||||
|
||||
|
||||
|
18
docs/PHP/danog/MadelineProto/Files/Server.md
Normal file
18
docs/PHP/danog/MadelineProto/Files/Server.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\Files\Server: MadelineProto fileserver.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Files\Server`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
MadelineProto fileserver.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
444
docs/PHP/danog/MadelineProto/Ipc/Client.md
Normal file
444
docs/PHP/danog/MadelineProto/Ipc/Client.md
Normal file
@ -0,0 +1,444 @@
|
||||
---
|
||||
title: danog\MadelineProto\Ipc\Client: IPC client.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Ipc\Client`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
IPC client.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `loop(callable $callback): \Generator`
|
||||
* `unreference(): void`
|
||||
* `isIpc(): bool`
|
||||
* `uploadFromUrl(string|\danog\MadelineProto\FileCallbackInterface $url, int $size, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
* `uploadFromCallable(mixed $callable, int $size, string $mime, string $fileName, callable $cb, bool $seekable, bool $encrypted): \Generator`
|
||||
* `uploadFromTgfile(mixed $media, callable $cb, bool $encrypted): \Generator`
|
||||
* `downloadToDir(mixed $messageMedia, string|\danog\MadelineProto\FileCallbackInterface $dir, callable $cb): \Generator Downloaded file path`
|
||||
* `downloadToFile(mixed $messageMedia, string|\danog\MadelineProto\FileCallbackInterface $file, callable $cb): \Generator Downloaded file path`
|
||||
* `downloadToCallable(mixed $messageMedia, callable|\danog\MadelineProto\FileCallbackInterface $callable, callable $cb, bool $seekable, int $offset, int $end, int $part_size): \Generator`
|
||||
* `setEventHandler(mixed $params): void`
|
||||
* `getEventHandler(mixed $params): void`
|
||||
* `logger(string $param, int $level, string $file): void`
|
||||
* `disconnect(): \Generator`
|
||||
* `start(): \Generator`
|
||||
* `getWebTemplate(): string`
|
||||
* `setWebTemplate(string $template): void`
|
||||
* `downloadToBrowser(array|string $messageMedia, callable $cb): \Generator`
|
||||
* `downloadToStream(mixed $messageMedia, mixed|\danog\MadelineProto\FileCallbackInterface $stream, callable $cb, int $offset, int $end): \Generator`
|
||||
* `downloadToResponse(array|string $messageMedia, \ServerRequest $request, callable $cb): \Generator Returned response`
|
||||
* `uploadEncrypted(\danog\MadelineProto\FileCallbackInterface|string|array $file, string $fileName, callable $cb): \Generator`
|
||||
* `upload(\danog\MadelineProto\FileCallbackInterface|string|array $file, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
* `uploadFromStream(mixed $stream, int $size, string $mime, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `loop(callable $callback): \Generator`
|
||||
|
||||
Run the provided async callable.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$callback`: `callable` Async callable to run
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `unreference(): void`
|
||||
|
||||
Unreference.
|
||||
|
||||
|
||||
|
||||
### `isIpc(): bool`
|
||||
|
||||
Whether we're an IPC client instance.
|
||||
|
||||
|
||||
|
||||
### `uploadFromUrl(string|\danog\MadelineProto\FileCallbackInterface $url, int $size, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
Upload file from URL.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$url`: `string|\danog\MadelineProto\FileCallbackInterface` URL of file
|
||||
* `$size`: `int` Size of file
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `uploadFromCallable(mixed $callable, int $size, string $mime, string $fileName, callable $cb, bool $seekable, bool $encrypted): \Generator`
|
||||
|
||||
Upload file from callable.
|
||||
The callable must accept two parameters: int $offset, int $size
|
||||
The callable must return a string with the contest of the file at the specified offset and size.
|
||||
|
||||
Parameters:
|
||||
* `$callable`: `mixed` Callable
|
||||
* `$size`: `int` File size
|
||||
* `$mime`: `string` Mime type
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$seekable`: `bool` Whether chunks can be fetched out of order
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<mixed>, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `uploadFromTgfile(mixed $media, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
Reupload telegram file.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$media`: `mixed` Telegram file
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<mixed>, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToDir(mixed $messageMedia, string|\danog\MadelineProto\FileCallbackInterface $dir, callable $cb): \Generator Downloaded file path`
|
||||
|
||||
Download file to directory.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File to download
|
||||
* `$dir`: `string|\danog\MadelineProto\FileCallbackInterface` Directory where to download the file
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
|
||||
|
||||
Return value: Downloaded file path
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<mixed>, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToFile(mixed $messageMedia, string|\danog\MadelineProto\FileCallbackInterface $file, callable $cb): \Generator Downloaded file path`
|
||||
|
||||
Download file.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File to download
|
||||
* `$file`: `string|\danog\MadelineProto\FileCallbackInterface` Downloaded file path
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
|
||||
|
||||
Return value: Downloaded file path
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<mixed>, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToCallable(mixed $messageMedia, callable|\danog\MadelineProto\FileCallbackInterface $callable, callable $cb, bool $seekable, int $offset, int $end, int $part_size): \Generator`
|
||||
|
||||
Download file to callable.
|
||||
The callable must accept two parameters: string $payload, int $offset
|
||||
The callable will be called (possibly out of order, depending on the value of $seekable).
|
||||
The callable should return the number of written bytes.
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File to download
|
||||
* `$callable`: `callable|\danog\MadelineProto\FileCallbackInterface` Chunk callback
|
||||
* `$cb`: `callable` Status callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$seekable`: `bool` Whether the callable can be called out of order
|
||||
* `$offset`: `int` Offset where to start downloading
|
||||
* `$end`: `int` Offset where to stop downloading (inclusive)
|
||||
* `$part_size`: `int` Size of each chunk
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<mixed>, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `setEventHandler(mixed $params): void`
|
||||
|
||||
Placeholder.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$params`: `mixed` Params
|
||||
|
||||
|
||||
|
||||
### `getEventHandler(mixed $params): void`
|
||||
|
||||
Placeholder.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$params`: `mixed` Params
|
||||
|
||||
|
||||
|
||||
### `logger(string $param, int $level, string $file): void`
|
||||
|
||||
Logger.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$param`: `string` Parameter
|
||||
* `$level`: `int` Logging level
|
||||
* `$file`: `string` File where the message originated
|
||||
|
||||
|
||||
|
||||
### `disconnect(): \Generator`
|
||||
|
||||
Disconnect cleanly from main instance.
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise, mixed, void>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `start(): \Generator`
|
||||
|
||||
Log in to telegram (via CLI or web).
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getWebTemplate(): string`
|
||||
|
||||
Get web template.
|
||||
|
||||
|
||||
|
||||
### `setWebTemplate(string $template): void`
|
||||
|
||||
Set web template.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$template`: `string` Template
|
||||
|
||||
|
||||
|
||||
### `downloadToBrowser(array|string $messageMedia, callable $cb): \Generator`
|
||||
|
||||
Download file to browser.
|
||||
Supports HEAD requests and content-ranges for parallel and resumed downloads.
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `array|string` File to download
|
||||
* `$cb`: `callable` Status callback (can also use FileCallback)
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToStream(mixed $messageMedia, mixed|\danog\MadelineProto\FileCallbackInterface $stream, callable $cb, int $offset, int $end): \Generator`
|
||||
|
||||
Download file to stream.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File to download
|
||||
* `$stream`: `mixed|\danog\MadelineProto\FileCallbackInterface` Stream where to download file
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$offset`: `int` Offset where to start downloading
|
||||
* `$end`: `int` Offset where to end download
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<mixed>|mixed, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToResponse(array|string $messageMedia, \ServerRequest $request, callable $cb): \Generator Returned response`
|
||||
|
||||
Download file to amphp/http-server response.
|
||||
Supports HEAD requests and content-ranges for parallel and resumed downloads.
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `array|string` File to download
|
||||
* `$request`: `\ServerRequest` Request
|
||||
* `$cb`: `callable` Status callback (can also use FileCallback)
|
||||
|
||||
|
||||
Return value: Returned response
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<mixed, array, mixed, \Amp\Http\Server\Response>
|
||||
```
|
||||
#### See also:
|
||||
* `\ServerRequest`
|
||||
* `\Amp\Http\Server\Response`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `uploadEncrypted(\danog\MadelineProto\FileCallbackInterface|string|array $file, string $fileName, callable $cb): \Generator`
|
||||
|
||||
Upload file to secret chat.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$file`: `\danog\MadelineProto\FileCallbackInterface|string|array` File, URL or Telegram file to upload
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<\Amp\File\File>|\Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<int>|\Amp\Promise<mixed>|\Amp\Promise<null|string>|\danog\MadelineProto\Stream\StreamInterface|array|int|mixed, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Promise`
|
||||
* `\Amp\File\File`
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* [`\danog\MadelineProto\Stream\StreamInterface`: Generic stream interface.](../Stream/StreamInterface.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `upload(\danog\MadelineProto\FileCallbackInterface|string|array $file, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
Upload file.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$file`: `\danog\MadelineProto\FileCallbackInterface|string|array` File, URL or Telegram file to upload
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<\Amp\File\File>|\Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<int>|\Amp\Promise<mixed>|\Amp\Promise<null|string>|\danog\MadelineProto\Stream\StreamInterface|array|int|mixed, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Promise`
|
||||
* `\Amp\File\File`
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* [`\danog\MadelineProto\Stream\StreamInterface`: Generic stream interface.](../Stream/StreamInterface.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `uploadFromStream(mixed $stream, int $size, string $mime, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
Upload file from stream.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$stream`: `mixed` PHP resource or AMPHP async stream
|
||||
* `$size`: `int` File size
|
||||
* `$mime`: `string` Mime type
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<int>|\Amp\Promise<null|string>|\danog\MadelineProto\Stream\StreamInterface|array|int|mixed, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* [`\danog\MadelineProto\Stream\StreamInterface`: Generic stream interface.](../Stream/StreamInterface.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
51
docs/PHP/danog/MadelineProto/Ipc/ClientAbstract.md
Normal file
51
docs/PHP/danog/MadelineProto/Ipc/ClientAbstract.md
Normal file
@ -0,0 +1,51 @@
|
||||
---
|
||||
title: danog\MadelineProto\Ipc\ClientAbstract: IPC client.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Ipc\ClientAbstract`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
IPC client.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `logger(string $param, int $level, string $file): void`
|
||||
* `disconnect(): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `logger(string $param, int $level, string $file): void`
|
||||
|
||||
Logger.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$param`: `string` Parameter
|
||||
* `$level`: `int` Logging level
|
||||
* `$file`: `string` File where the message originated
|
||||
|
||||
|
||||
|
||||
### `disconnect(): \Generator`
|
||||
|
||||
Disconnect cleanly from main instance.
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise, mixed, void>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
47
docs/PHP/danog/MadelineProto/Ipc/IpcState.md
Normal file
47
docs/PHP/danog/MadelineProto/Ipc/IpcState.md
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
title: danog\MadelineProto\Ipc\IpcState: IPC state class.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Ipc\IpcState`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
IPC state class.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getStartupTime(): float`
|
||||
* `getStartupId(): int`
|
||||
* `getException(): ?\Throwable`
|
||||
|
||||
## Methods:
|
||||
### `getStartupTime(): float`
|
||||
|
||||
Get startup time.
|
||||
|
||||
|
||||
|
||||
### `getStartupId(): int`
|
||||
|
||||
Get startup ID.
|
||||
|
||||
|
||||
|
||||
### `getException(): ?\Throwable`
|
||||
|
||||
Get exception.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
147
docs/PHP/danog/MadelineProto/Ipc/Server.md
Normal file
147
docs/PHP/danog/MadelineProto/Ipc/Server.md
Normal file
@ -0,0 +1,147 @@
|
||||
---
|
||||
title: danog\MadelineProto\Ipc\Server: IPC server.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Ipc\Server`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
IPC server.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* danog\MadelineProto\Ipc\Server::SHUTDOWN: Shutdown server.
|
||||
|
||||
|
||||
## Method list:
|
||||
* `setIpcPath(\danog\MadelineProto\SessionPaths $session): void`
|
||||
* `startMe(\danog\MadelineProto\SessionPaths $session): \Amp\Promise`
|
||||
* `waitShutdown(): \Amp\Promise`
|
||||
* `loop(): \Generator`
|
||||
* `setSettings(\danog\MadelineProto\Settings\Ipc $settings): self`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `setIpcPath(\danog\MadelineProto\SessionPaths $session): void`
|
||||
|
||||
Set IPC path.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$session`: `\danog\MadelineProto\SessionPaths` Session
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\SessionPaths`: Session path information.](../SessionPaths.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `startMe(\danog\MadelineProto\SessionPaths $session): \Amp\Promise`
|
||||
|
||||
Start IPC server in background.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$session`: `\danog\MadelineProto\SessionPaths` Session path
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\SessionPaths`: Session path information.](../SessionPaths.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitShutdown(): \Amp\Promise`
|
||||
|
||||
Wait for shutdown.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `setSettings(\danog\MadelineProto\Settings\Ipc $settings): self`
|
||||
|
||||
Set IPC settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Ipc` IPC settings
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Ipc`: IPC server settings.](../Settings/Ipc.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
147
docs/PHP/danog/MadelineProto/Ipc/ServerCallback.md
Normal file
147
docs/PHP/danog/MadelineProto/Ipc/ServerCallback.md
Normal file
@ -0,0 +1,147 @@
|
||||
---
|
||||
title: danog\MadelineProto\Ipc\ServerCallback: IPC callback server.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Ipc\ServerCallback`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
IPC callback server.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* danog\MadelineProto\Ipc\ServerCallback::SHUTDOWN: Shutdown server.
|
||||
|
||||
|
||||
## Method list:
|
||||
* `setIpcPath(\danog\MadelineProto\SessionPaths $session): void`
|
||||
* `startMe(\danog\MadelineProto\SessionPaths $session): \Amp\Promise`
|
||||
* `waitShutdown(): \Amp\Promise`
|
||||
* `loop(): \Generator`
|
||||
* `setSettings(\danog\MadelineProto\Settings\Ipc $settings): self`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `setIpcPath(\danog\MadelineProto\SessionPaths $session): void`
|
||||
|
||||
Set IPC path.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$session`: `\danog\MadelineProto\SessionPaths` Session
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\SessionPaths`: Session path information.](../SessionPaths.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `startMe(\danog\MadelineProto\SessionPaths $session): \Amp\Promise`
|
||||
|
||||
Start IPC server in background.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$session`: `\danog\MadelineProto\SessionPaths` Session path
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\SessionPaths`: Session path information.](../SessionPaths.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitShutdown(): \Amp\Promise`
|
||||
|
||||
Wait for shutdown.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `setSettings(\danog\MadelineProto\Settings\Ipc $settings): self`
|
||||
|
||||
Set IPC settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Ipc` IPC settings
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Ipc`: IPC server settings.](../Settings/Ipc.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
87
docs/PHP/danog/MadelineProto/Ipc/Wrapper.md
Normal file
87
docs/PHP/danog/MadelineProto/Ipc/Wrapper.md
Normal file
@ -0,0 +1,87 @@
|
||||
---
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## 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`
|
||||
|
||||
|
||||
|
||||
|
||||
### `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
|
||||
|
||||
|
||||
|
||||
### `logger(string $param, int $level, string $file): void`
|
||||
|
||||
Logger.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$param`: `string` Parameter
|
||||
* `$level`: `int` Logging level
|
||||
* `$file`: `string` File where the message originated
|
||||
|
||||
|
||||
|
||||
### `disconnect(): \Generator`
|
||||
|
||||
Disconnect cleanly from main instance.
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise, mixed, void>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
18
docs/PHP/danog/MadelineProto/Ipc/Wrapper/Obj.md
Normal file
18
docs/PHP/danog/MadelineProto/Ipc/Wrapper/Obj.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\Ipc\Wrapper\Obj: Generic callback wrapper object.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Ipc\Wrapper\Obj`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Generic callback wrapper object.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
96
docs/PHP/danog/MadelineProto/Logger.md
Normal file
96
docs/PHP/danog/MadelineProto/Logger.md
Normal file
@ -0,0 +1,96 @@
|
||||
---
|
||||
title: danog\MadelineProto\Logger: Logger class.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Logger`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Logger class.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* `danog\MadelineProto\Logger::LEVEL_ULTRA_VERBOSE`: Ultra verbose level.
|
||||
|
||||
* `danog\MadelineProto\Logger::LEVEL_VERBOSE`: Verbose level.
|
||||
|
||||
* `danog\MadelineProto\Logger::LEVEL_NOTICE`: Notice level.
|
||||
|
||||
* `danog\MadelineProto\Logger::LEVEL_WARNING`: Warning level.
|
||||
|
||||
* `danog\MadelineProto\Logger::LEVEL_ERROR`: Error level.
|
||||
|
||||
* `danog\MadelineProto\Logger::LEVEL_FATAL`: Fatal error level.
|
||||
|
||||
* `danog\MadelineProto\Logger::LOGGER_DEFAULT`: Default logger (syslog).
|
||||
|
||||
* `danog\MadelineProto\Logger::LOGGER_ECHO`: Echo logger.
|
||||
|
||||
* `danog\MadelineProto\Logger::LOGGER_FILE`: File logger.
|
||||
|
||||
* `danog\MadelineProto\Logger::LOGGER_CALLABLE`: Callable logger.
|
||||
|
||||
|
||||
## Method list:
|
||||
* `constructorFromSettings(\danog\MadelineProto\Settings\Logger $settings): self`
|
||||
* `log(mixed $param, int $level): void`
|
||||
* `logger(mixed $param, int $level, string $file): void`
|
||||
* `getPsrLogger(): \Psr\Log\LoggerInterface`
|
||||
|
||||
## Methods:
|
||||
### `constructorFromSettings(\danog\MadelineProto\Settings\Logger $settings): self`
|
||||
|
||||
Construct global static logger from MadelineProto settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\Settings\Logger` Settings instance
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Logger`: Logger settings.](./Settings/Logger.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `log(mixed $param, int $level): void`
|
||||
|
||||
Log a message.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$param`: `mixed` Message
|
||||
* `$level`: `int` Logging level
|
||||
|
||||
|
||||
|
||||
### `logger(mixed $param, int $level, string $file): void`
|
||||
|
||||
Log a message.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$param`: `mixed` Message to log
|
||||
* `$level`: `int` Logging level
|
||||
* `$file`: `string` File that originated the message
|
||||
|
||||
|
||||
|
||||
### `getPsrLogger(): \Psr\Log\LoggerInterface`
|
||||
|
||||
Get PSR logger.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Psr\Log\LoggerInterface`
|
||||
|
||||
|
||||
|
||||
|
35
docs/PHP/danog/MadelineProto/Loop/APILoop.md
Normal file
35
docs/PHP/danog/MadelineProto/Loop/APILoop.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\APILoop: API loop trait.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\APILoop`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
API loop trait.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
|
||||
## Methods:
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
120
docs/PHP/danog/MadelineProto/Loop/Connection/CheckLoop.md
Normal file
120
docs/PHP/danog/MadelineProto/Loop/Connection/CheckLoop.md
Normal file
@ -0,0 +1,120 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\Connection\CheckLoop: RPC call status check loop.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\Connection\CheckLoop`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
RPC call status check loop.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `loop(): \Generator`
|
||||
* `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
* `resume(): \Promise Resolved when the loop is paused again`
|
||||
* `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
|
||||
Pause the loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$time`: `?int` For how long to pause the loop, if null will pause forever (until resume is called from outside of the loop)
|
||||
|
||||
|
||||
Return value: Resolved when the loop is resumed
|
||||
|
||||
|
||||
### `resume(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Resume the loop.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Defer resuming the loop to next tick.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
35
docs/PHP/danog/MadelineProto/Loop/Connection/Common.md
Normal file
35
docs/PHP/danog/MadelineProto/Loop/Connection/Common.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\Connection\Common: RPC call status check loop.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\Connection\Common`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
RPC call status check loop.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
|
||||
## Methods:
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
120
docs/PHP/danog/MadelineProto/Loop/Connection/HttpWaitLoop.md
Normal file
120
docs/PHP/danog/MadelineProto/Loop/Connection/HttpWaitLoop.md
Normal file
@ -0,0 +1,120 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\Connection\HttpWaitLoop: HttpWait loop.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\Connection\HttpWaitLoop`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
HttpWait loop.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `loop(): \Generator`
|
||||
* `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
* `resume(): \Promise Resolved when the loop is paused again`
|
||||
* `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
|
||||
Pause the loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$time`: `?int` For how long to pause the loop, if null will pause forever (until resume is called from outside of the loop)
|
||||
|
||||
|
||||
Return value: Resolved when the loop is resumed
|
||||
|
||||
|
||||
### `resume(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Resume the loop.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Defer resuming the loop to next tick.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
120
docs/PHP/danog/MadelineProto/Loop/Connection/PingLoop.md
Normal file
120
docs/PHP/danog/MadelineProto/Loop/Connection/PingLoop.md
Normal file
@ -0,0 +1,120 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\Connection\PingLoop: Ping loop.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\Connection\PingLoop`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Ping loop.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `loop(): \Generator`
|
||||
* `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
* `resume(): \Promise Resolved when the loop is paused again`
|
||||
* `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
|
||||
Pause the loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$time`: `?int` For how long to pause the loop, if null will pause forever (until resume is called from outside of the loop)
|
||||
|
||||
|
||||
Return value: Resolved when the loop is resumed
|
||||
|
||||
|
||||
### `resume(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Resume the loop.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Defer resuming the loop to next tick.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
89
docs/PHP/danog/MadelineProto/Loop/Connection/ReadLoop.md
Normal file
89
docs/PHP/danog/MadelineProto/Loop/Connection/ReadLoop.md
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\Connection\ReadLoop: Socket read loop.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\Connection\ReadLoop`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Socket read loop.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `loop(): \Generator`
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
126
docs/PHP/danog/MadelineProto/Loop/Connection/WriteLoop.md
Normal file
126
docs/PHP/danog/MadelineProto/Loop/Connection/WriteLoop.md
Normal file
@ -0,0 +1,126 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\Connection\WriteLoop: Socket write loop.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\Connection\WriteLoop`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Socket write loop.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* danog\MadelineProto\Loop\Connection\WriteLoop::MAX_COUNT:
|
||||
|
||||
* danog\MadelineProto\Loop\Connection\WriteLoop::MAX_IDS:
|
||||
|
||||
|
||||
## Method list:
|
||||
* `loop(): \Generator`
|
||||
* `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
* `resume(): \Promise Resolved when the loop is paused again`
|
||||
* `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
|
||||
Pause the loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$time`: `?int` For how long to pause the loop, if null will pause forever (until resume is called from outside of the loop)
|
||||
|
||||
|
||||
Return value: Resolved when the loop is resumed
|
||||
|
||||
|
||||
### `resume(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Resume the loop.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Defer resuming the loop to next tick.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
124
docs/PHP/danog/MadelineProto/Loop/Update/FeedLoop.md
Normal file
124
docs/PHP/danog/MadelineProto/Loop/Update/FeedLoop.md
Normal file
@ -0,0 +1,124 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\Update\FeedLoop: Update feed loop.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\Update\FeedLoop`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Update feed loop.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* danog\MadelineProto\Loop\Update\FeedLoop::GENERIC: Main loop ID.
|
||||
|
||||
|
||||
## Method list:
|
||||
* `loop(): \Generator`
|
||||
* `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
* `resume(): \Promise Resolved when the loop is paused again`
|
||||
* `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
|
||||
Pause the loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$time`: `?int` For how long to pause the loop, if null will pause forever (until resume is called from outside of the loop)
|
||||
|
||||
|
||||
Return value: Resolved when the loop is resumed
|
||||
|
||||
|
||||
### `resume(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Resume the loop.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Defer resuming the loop to next tick.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
120
docs/PHP/danog/MadelineProto/Loop/Update/SeqLoop.md
Normal file
120
docs/PHP/danog/MadelineProto/Loop/Update/SeqLoop.md
Normal file
@ -0,0 +1,120 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\Update\SeqLoop: update feed loop.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\Update\SeqLoop`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
update feed loop.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `loop(): \Generator`
|
||||
* `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
* `resume(): \Promise Resolved when the loop is paused again`
|
||||
* `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
|
||||
Pause the loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$time`: `?int` For how long to pause the loop, if null will pause forever (until resume is called from outside of the loop)
|
||||
|
||||
|
||||
Return value: Resolved when the loop is resumed
|
||||
|
||||
|
||||
### `resume(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Resume the loop.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Defer resuming the loop to next tick.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
124
docs/PHP/danog/MadelineProto/Loop/Update/UpdateLoop.md
Normal file
124
docs/PHP/danog/MadelineProto/Loop/Update/UpdateLoop.md
Normal file
@ -0,0 +1,124 @@
|
||||
---
|
||||
title: danog\MadelineProto\Loop\Update\UpdateLoop: Update loop.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Loop\Update\UpdateLoop`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Update loop.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* danog\MadelineProto\Loop\Update\UpdateLoop::GENERIC: Main loop ID.
|
||||
|
||||
|
||||
## Method list:
|
||||
* `loop(): \Generator`
|
||||
* `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
* `resume(): \Promise Resolved when the loop is paused again`
|
||||
* `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
* `start(): bool`
|
||||
* `isRunning(): bool`
|
||||
* `signal(mixed|\Throwable $what): void`
|
||||
* `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
## Methods:
|
||||
### `loop(): \Generator`
|
||||
|
||||
Main loop.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `pause(?int $time): \Promise Resolved when the loop is resumed`
|
||||
|
||||
Pause the loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$time`: `?int` For how long to pause the loop, if null will pause forever (until resume is called from outside of the loop)
|
||||
|
||||
|
||||
Return value: Resolved when the loop is resumed
|
||||
|
||||
|
||||
### `resume(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Resume the loop.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `resumeDefer(): \Promise Resolved when the loop is paused again`
|
||||
|
||||
Defer resuming the loop to next tick.
|
||||
|
||||
|
||||
Return value: Resolved when the loop is paused again
|
||||
|
||||
|
||||
### `start(): bool`
|
||||
|
||||
Start the loop.
|
||||
Returns false if the loop is already running.
|
||||
|
||||
|
||||
### `isRunning(): bool`
|
||||
|
||||
Check whether loop is running.
|
||||
|
||||
|
||||
|
||||
### `signal(mixed|\Throwable $what): void`
|
||||
|
||||
Send signal to loop.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$what`: `mixed|\Throwable` Data to signal
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `waitSignal(\Promise|\Generator $promise): \Promise`
|
||||
|
||||
Resolve the promise or return|throw the signal.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$promise`: `\Promise|\Generator` The original promise or generator
|
||||
Full type:
|
||||
```
|
||||
\Promise<\T>|\Generator<mixed, \Promise|array<array-key, \Promise>, mixed, \Promise<\T>|\T>
|
||||
```
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Promise<\T|mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Promise`
|
||||
* `\Generator`
|
||||
* `\T`
|
||||
|
||||
|
||||
|
||||
|
33
docs/PHP/danog/MadelineProto/Lua.md
Normal file
33
docs/PHP/danog/MadelineProto/Lua.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: danog\MadelineProto\Lua: Lua interface.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Lua`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Lua interface.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `tdcliFunction(): \Generator|int`
|
||||
|
||||
## Methods:
|
||||
### `tdcliFunction(): \Generator|int`
|
||||
|
||||
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
1839
docs/PHP/danog/MadelineProto/MTProto.md
Normal file
1839
docs/PHP/danog/MadelineProto/MTProto.md
Normal file
File diff suppressed because it is too large
Load Diff
96
docs/PHP/danog/MadelineProto/MTProto/AuthKey.md
Normal file
96
docs/PHP/danog/MadelineProto/MTProto/AuthKey.md
Normal file
@ -0,0 +1,96 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProto\AuthKey: MTProto auth key.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProto\AuthKey`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
MTProto auth key.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `setAuthKey(string $authKey): void`
|
||||
* `hasAuthKey(): bool`
|
||||
* `getAuthKey(): string`
|
||||
* `getID(): string`
|
||||
* `setServerSalt(string $salt): void`
|
||||
* `getServerSalt(): string`
|
||||
* `hasServerSalt(): bool`
|
||||
* `isAuthorized(): bool`
|
||||
* `authorized(bool $authorized): void`
|
||||
|
||||
## Methods:
|
||||
### `setAuthKey(string $authKey): void`
|
||||
|
||||
Set auth key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$authKey`: `string` Authorization key
|
||||
|
||||
|
||||
|
||||
### `hasAuthKey(): bool`
|
||||
|
||||
Check if auth key is present.
|
||||
|
||||
|
||||
|
||||
### `getAuthKey(): string`
|
||||
|
||||
Get auth key.
|
||||
|
||||
|
||||
|
||||
### `getID(): string`
|
||||
|
||||
Get auth key ID.
|
||||
|
||||
|
||||
|
||||
### `setServerSalt(string $salt): void`
|
||||
|
||||
Set server salt.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$salt`: `string` Server salt
|
||||
|
||||
|
||||
|
||||
### `getServerSalt(): string`
|
||||
|
||||
Get server salt.
|
||||
|
||||
|
||||
|
||||
### `hasServerSalt(): bool`
|
||||
|
||||
Check if has server salt.
|
||||
|
||||
|
||||
|
||||
### `isAuthorized(): bool`
|
||||
|
||||
Check if we are logged in.
|
||||
|
||||
|
||||
|
||||
### `authorized(bool $authorized): void`
|
||||
|
||||
Set the authorized boolean.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$authorized`: `bool` Whether we are authorized
|
||||
|
||||
|
||||
|
103
docs/PHP/danog/MadelineProto/MTProto/PermAuthKey.md
Normal file
103
docs/PHP/danog/MadelineProto/MTProto/PermAuthKey.md
Normal file
@ -0,0 +1,103 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProto\PermAuthKey: MTProto permanent auth key.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProto\PermAuthKey`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
MTProto permanent auth key.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `isAuthorized(): bool`
|
||||
* `authorized(bool $authorized): void`
|
||||
* `jsonSerialize(): array`
|
||||
* `setAuthKey(string $authKey): void`
|
||||
* `hasAuthKey(): bool`
|
||||
* `getAuthKey(): string`
|
||||
* `getID(): string`
|
||||
* `setServerSalt(string $salt): void`
|
||||
* `getServerSalt(): string`
|
||||
* `hasServerSalt(): bool`
|
||||
|
||||
## Methods:
|
||||
### `isAuthorized(): bool`
|
||||
|
||||
Check if we are logged in.
|
||||
|
||||
|
||||
|
||||
### `authorized(bool $authorized): void`
|
||||
|
||||
Set the authorized boolean.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$authorized`: `bool` Whether we are authorized
|
||||
|
||||
|
||||
|
||||
### `jsonSerialize(): array`
|
||||
|
||||
JSON serialization function.
|
||||
|
||||
|
||||
|
||||
### `setAuthKey(string $authKey): void`
|
||||
|
||||
Set auth key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$authKey`: `string` Authorization key
|
||||
|
||||
|
||||
|
||||
### `hasAuthKey(): bool`
|
||||
|
||||
Check if auth key is present.
|
||||
|
||||
|
||||
|
||||
### `getAuthKey(): string`
|
||||
|
||||
Get auth key.
|
||||
|
||||
|
||||
|
||||
### `getID(): string`
|
||||
|
||||
Get auth key ID.
|
||||
|
||||
|
||||
|
||||
### `setServerSalt(string $salt): void`
|
||||
|
||||
Set server salt.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$salt`: `string` Server salt
|
||||
|
||||
|
||||
|
||||
### `getServerSalt(): string`
|
||||
|
||||
Get server salt.
|
||||
|
||||
|
||||
|
||||
### `hasServerSalt(): bool`
|
||||
|
||||
Check if has server salt.
|
||||
|
||||
|
||||
|
163
docs/PHP/danog/MadelineProto/MTProto/TempAuthKey.md
Normal file
163
docs/PHP/danog/MadelineProto/MTProto/TempAuthKey.md
Normal file
@ -0,0 +1,163 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProto\TempAuthKey: MTProto temporary auth key.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProto\TempAuthKey`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
MTProto temporary auth key.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `init(bool $init): void`
|
||||
* `isInited(): bool`
|
||||
* `bind(\danog\MadelineProto\MTProto\PermAuthKey|null $bound, bool $pfs): void`
|
||||
* `isBound(): bool`
|
||||
* `isAuthorized(): bool`
|
||||
* `authorized(bool $authorized): void`
|
||||
* `expires(int $expires): void`
|
||||
* `expired(): bool`
|
||||
* `jsonSerialize(): array`
|
||||
* `setAuthKey(string $authKey): void`
|
||||
* `hasAuthKey(): bool`
|
||||
* `getAuthKey(): string`
|
||||
* `getID(): string`
|
||||
* `setServerSalt(string $salt): void`
|
||||
* `getServerSalt(): string`
|
||||
* `hasServerSalt(): bool`
|
||||
|
||||
## Methods:
|
||||
### `init(bool $init): void`
|
||||
|
||||
Init or deinit connection for auth key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$init`: `bool` Init or deinit
|
||||
|
||||
|
||||
|
||||
### `isInited(): bool`
|
||||
|
||||
Check if connection is inited for auth key.
|
||||
|
||||
|
||||
|
||||
### `bind(\danog\MadelineProto\MTProto\PermAuthKey|null $bound, bool $pfs): void`
|
||||
|
||||
Bind auth key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$bound`: `\danog\MadelineProto\MTProto\PermAuthKey|null` Permanent auth key
|
||||
* `$pfs`: `bool` Whether to bind using PFS
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\MTProto\PermAuthKey`: MTProto permanent auth key.](./PermAuthKey.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `isBound(): bool`
|
||||
|
||||
Check if auth key is bound.
|
||||
|
||||
|
||||
|
||||
### `isAuthorized(): bool`
|
||||
|
||||
Check if we are logged in.
|
||||
|
||||
|
||||
|
||||
### `authorized(bool $authorized): void`
|
||||
|
||||
Set the authorized boolean.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$authorized`: `bool` Whether we are authorized
|
||||
|
||||
|
||||
|
||||
### `expires(int $expires): void`
|
||||
|
||||
Set expiration date of temporary auth key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$expires`: `int` Expiration date
|
||||
|
||||
|
||||
|
||||
### `expired(): bool`
|
||||
|
||||
Check if auth key has expired.
|
||||
|
||||
|
||||
|
||||
### `jsonSerialize(): array`
|
||||
|
||||
JSON serialization function.
|
||||
|
||||
|
||||
|
||||
### `setAuthKey(string $authKey): void`
|
||||
|
||||
Set auth key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$authKey`: `string` Authorization key
|
||||
|
||||
|
||||
|
||||
### `hasAuthKey(): bool`
|
||||
|
||||
Check if auth key is present.
|
||||
|
||||
|
||||
|
||||
### `getAuthKey(): string`
|
||||
|
||||
Get auth key.
|
||||
|
||||
|
||||
|
||||
### `getID(): string`
|
||||
|
||||
Get auth key ID.
|
||||
|
||||
|
||||
|
||||
### `setServerSalt(string $salt): void`
|
||||
|
||||
Set server salt.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$salt`: `string` Server salt
|
||||
|
||||
|
||||
|
||||
### `getServerSalt(): string`
|
||||
|
||||
Get server salt.
|
||||
|
||||
|
||||
|
||||
### `hasServerSalt(): bool`
|
||||
|
||||
Check if has server salt.
|
||||
|
||||
|
||||
|
70
docs/PHP/danog/MadelineProto/MTProtoSession/AckHandler.md
Normal file
70
docs/PHP/danog/MadelineProto/MTProtoSession/AckHandler.md
Normal file
@ -0,0 +1,70 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoSession\AckHandler: Manages acknowledgement of messages.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoSession\AckHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages acknowledgement of messages.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `ackOutgoingMessageId(string|int $message_id): bool`
|
||||
* `gotResponseForOutgoingMessageId(string|int $message_id): bool`
|
||||
* `ackIncomingMessageId(string|int $message_id): bool`
|
||||
* `hasPendingCalls(): bool`
|
||||
* `getPendingCalls(): array`
|
||||
|
||||
## Methods:
|
||||
### `ackOutgoingMessageId(string|int $message_id): bool`
|
||||
|
||||
Acknowledge outgoing message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message_id`: `string|int` Message Id
|
||||
|
||||
|
||||
|
||||
### `gotResponseForOutgoingMessageId(string|int $message_id): bool`
|
||||
|
||||
We have gotten response for outgoing message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message_id`: `string|int` Message ID
|
||||
|
||||
|
||||
|
||||
### `ackIncomingMessageId(string|int $message_id): bool`
|
||||
|
||||
Acknowledge incoming message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message_id`: `string|int` Message ID
|
||||
|
||||
|
||||
|
||||
### `hasPendingCalls(): bool`
|
||||
|
||||
Check if there are some pending calls.
|
||||
|
||||
|
||||
|
||||
### `getPendingCalls(): array`
|
||||
|
||||
Get all pending calls (also clear pending state requests).
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
* `$shared`: `\DataCenterConnection`
|
95
docs/PHP/danog/MadelineProto/MTProtoSession/CallHandler.md
Normal file
95
docs/PHP/danog/MadelineProto/MTProtoSession/CallHandler.md
Normal file
@ -0,0 +1,95 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoSession\CallHandler: Manages method and object calls.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoSession\CallHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages method and object calls.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `methodRecall(string $watcherId, array $args): void`
|
||||
* `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
* `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
* `objectCall(string $object, array $args, array $aargs): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `methodRecall(string $watcherId, array $args): void`
|
||||
|
||||
Recall method.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$watcherId`: `string` Watcher ID for defer
|
||||
* `$args`: `array` Args
|
||||
|
||||
|
||||
|
||||
### `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
|
||||
Call method and wait asynchronously for response.
|
||||
If the $aargs['noResponse'] is true, will not wait for a response.
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` Method name
|
||||
* `$args`: `array|\Generator` Arguments
|
||||
Full type:
|
||||
```
|
||||
array|\Generator<mixed, mixed, mixed, array>
|
||||
```
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
|
||||
Call method and make sure it is asynchronously sent (generator).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` Method name
|
||||
* `$args`: `array|\Generator` Arguments
|
||||
Full type:
|
||||
```
|
||||
array|\Generator<mixed, mixed, mixed, array>
|
||||
```
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `objectCall(string $object, array $args, array $aargs): \Generator`
|
||||
|
||||
Send object and make sure it is asynchronously sent (generator).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$object`: `string` Object name
|
||||
* `$args`: `array` Arguments
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
67
docs/PHP/danog/MadelineProto/MTProtoSession/MsgIdHandler.md
Normal file
67
docs/PHP/danog/MadelineProto/MTProtoSession/MsgIdHandler.md
Normal file
@ -0,0 +1,67 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoSession\MsgIdHandler: Manages message ids.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoSession\MsgIdHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages message ids.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `createInstance(\danog\MadelineProto\Connection $session): self`
|
||||
* `checkMessageId(string $newMessageId, array $aargs): void`
|
||||
* `generateMessageId(): string`
|
||||
* `getMaxId(bool $incoming): mixed`
|
||||
|
||||
## Methods:
|
||||
### `createInstance(\danog\MadelineProto\Connection $session): self`
|
||||
|
||||
Create MsgIdHandler instance.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$session`: `\danog\MadelineProto\Connection` Session
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Connection`: Connection class.](../Connection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `checkMessageId(string $newMessageId, array $aargs): void`
|
||||
|
||||
Check validity of given message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$newMessageId`: `string` New message ID
|
||||
* `$aargs`: `array` Params
|
||||
|
||||
|
||||
|
||||
### `generateMessageId(): string`
|
||||
|
||||
Generate outgoing message ID.
|
||||
|
||||
|
||||
|
||||
### `getMaxId(bool $incoming): mixed`
|
||||
|
||||
Get maximum message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$incoming`: `bool` Incoming or outgoing message ID
|
||||
|
||||
|
||||
|
@ -0,0 +1,74 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoSession\MsgIdHandler\MsgIdHandler32: Manages message ids.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoSession\MsgIdHandler\MsgIdHandler32`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages message ids.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `checkMessageId(string $newMessageId, array $aargs): void`
|
||||
* `generateMessageId(): string`
|
||||
* `getMaxId(bool $incoming): mixed`
|
||||
* `reset(): void`
|
||||
* `createInstance(\danog\MadelineProto\Connection $session): self`
|
||||
|
||||
## Methods:
|
||||
### `checkMessageId(string $newMessageId, array $aargs): void`
|
||||
|
||||
Check validity of given message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$newMessageId`: `string` New message ID
|
||||
* `$aargs`: `array` Params
|
||||
|
||||
|
||||
|
||||
### `generateMessageId(): string`
|
||||
|
||||
Generate message ID.
|
||||
|
||||
|
||||
|
||||
### `getMaxId(bool $incoming): mixed`
|
||||
|
||||
Get maximum message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$incoming`: `bool` Incoming or outgoing message ID
|
||||
|
||||
|
||||
|
||||
### `reset(): void`
|
||||
|
||||
Reset message IDs.
|
||||
|
||||
|
||||
|
||||
### `createInstance(\danog\MadelineProto\Connection $session): self`
|
||||
|
||||
Create MsgIdHandler instance.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$session`: `\danog\MadelineProto\Connection` Session
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Connection`: Connection class.](../Connection.md)
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,67 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoSession\MsgIdHandler\MsgIdHandler64: Manages message ids.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoSession\MsgIdHandler\MsgIdHandler64`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages message ids.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `checkMessageId(string $newMessageId, array $aargs): void`
|
||||
* `generateMessageId(): string`
|
||||
* `getMaxId(bool $incoming): mixed`
|
||||
* `createInstance(\danog\MadelineProto\Connection $session): self`
|
||||
|
||||
## Methods:
|
||||
### `checkMessageId(string $newMessageId, array $aargs): void`
|
||||
|
||||
Check validity of given message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$newMessageId`: `string` New message ID
|
||||
* `$aargs`: `array` Params
|
||||
|
||||
|
||||
|
||||
### `generateMessageId(): string`
|
||||
|
||||
Generate message ID.
|
||||
|
||||
|
||||
|
||||
### `getMaxId(bool $incoming): mixed`
|
||||
|
||||
Get maximum message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$incoming`: `bool` Incoming or outgoing message ID
|
||||
|
||||
|
||||
|
||||
### `createInstance(\danog\MadelineProto\Connection $session): self`
|
||||
|
||||
Create MsgIdHandler instance.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$session`: `\danog\MadelineProto\Connection` Session
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Connection`: Connection class.](../Connection.md)
|
||||
|
||||
|
||||
|
||||
|
38
docs/PHP/danog/MadelineProto/MTProtoSession/Reliable.md
Normal file
38
docs/PHP/danog/MadelineProto/MTProtoSession/Reliable.md
Normal file
@ -0,0 +1,38 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoSession\Reliable: Manages responses.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoSession\Reliable`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages responses.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator`
|
||||
|
||||
Send state info for message IDs.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$req_msg_id`: `string|int` Message ID of msgs_state_req that initiated this
|
||||
* `$msg_ids`: `array` Message IDs to send info about
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,45 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoSession\ResponseHandler: Manages responses.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoSession\ResponseHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages responses.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `handleReject(array $request, \Throwable $data): void`
|
||||
* `handleResponse(): void`
|
||||
|
||||
## Methods:
|
||||
### `handleReject(array $request, \Throwable $data): void`
|
||||
|
||||
Reject request with exception.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$request`: `array` Request
|
||||
* `$data`: `\Throwable` Exception
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `handleResponse(): void`
|
||||
|
||||
|
||||
|
||||
|
||||
|
18
docs/PHP/danog/MadelineProto/MTProtoSession/SeqNoHandler.md
Normal file
18
docs/PHP/danog/MadelineProto/MTProtoSession/SeqNoHandler.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoSession\SeqNoHandler: Manages sequence number.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoSession\SeqNoHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages sequence number.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
204
docs/PHP/danog/MadelineProto/MTProtoSession/Session.md
Normal file
204
docs/PHP/danog/MadelineProto/MTProtoSession/Session.md
Normal file
@ -0,0 +1,204 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoSession\Session: Manages MTProto session-specific data.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoSession\Session`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages MTProto session-specific data.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `resetSession(): void`
|
||||
* `createSession(): void`
|
||||
* `backupSession(): array`
|
||||
* `ackOutgoingMessageId(string|int $message_id): bool`
|
||||
* `gotResponseForOutgoingMessageId(string|int $message_id): bool`
|
||||
* `ackIncomingMessageId(string|int $message_id): bool`
|
||||
* `hasPendingCalls(): bool`
|
||||
* `getPendingCalls(): array`
|
||||
* `handleReject(array $request, \Throwable $data): void`
|
||||
* `handleResponse(): void`
|
||||
* `methodRecall(string $watcherId, array $args): void`
|
||||
* `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
* `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
* `objectCall(string $object, array $args, array $aargs): \Generator`
|
||||
* `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `resetSession(): void`
|
||||
|
||||
Reset MTProto session.
|
||||
|
||||
|
||||
|
||||
### `createSession(): void`
|
||||
|
||||
Create MTProto session if needed.
|
||||
|
||||
|
||||
|
||||
### `backupSession(): array`
|
||||
|
||||
Backup eventual unsent messages before session deletion.
|
||||
|
||||
|
||||
|
||||
### `ackOutgoingMessageId(string|int $message_id): bool`
|
||||
|
||||
Acknowledge outgoing message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message_id`: `string|int` Message Id
|
||||
|
||||
|
||||
|
||||
### `gotResponseForOutgoingMessageId(string|int $message_id): bool`
|
||||
|
||||
We have gotten response for outgoing message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message_id`: `string|int` Message ID
|
||||
|
||||
|
||||
|
||||
### `ackIncomingMessageId(string|int $message_id): bool`
|
||||
|
||||
Acknowledge incoming message ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message_id`: `string|int` Message ID
|
||||
|
||||
|
||||
|
||||
### `hasPendingCalls(): bool`
|
||||
|
||||
Check if there are some pending calls.
|
||||
|
||||
|
||||
|
||||
### `getPendingCalls(): array`
|
||||
|
||||
Get all pending calls (also clear pending state requests).
|
||||
|
||||
|
||||
|
||||
### `handleReject(array $request, \Throwable $data): void`
|
||||
|
||||
Reject request with exception.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$request`: `array` Request
|
||||
* `$data`: `\Throwable` Exception
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Throwable`
|
||||
|
||||
|
||||
|
||||
|
||||
### `handleResponse(): void`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### `methodRecall(string $watcherId, array $args): void`
|
||||
|
||||
Recall method.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$watcherId`: `string` Watcher ID for defer
|
||||
* `$args`: `array` Args
|
||||
|
||||
|
||||
|
||||
### `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
|
||||
Call method and wait asynchronously for response.
|
||||
If the $aargs['noResponse'] is true, will not wait for a response.
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` Method name
|
||||
* `$args`: `array|\Generator` Arguments
|
||||
Full type:
|
||||
```
|
||||
array|\Generator<mixed, mixed, mixed, array>
|
||||
```
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
|
||||
Call method and make sure it is asynchronously sent (generator).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` Method name
|
||||
* `$args`: `array|\Generator` Arguments
|
||||
Full type:
|
||||
```
|
||||
array|\Generator<mixed, mixed, mixed, array>
|
||||
```
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `objectCall(string $object, array $args, array $aargs): \Generator`
|
||||
|
||||
Send object and make sure it is asynchronously sent (generator).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$object`: `string` Object name
|
||||
* `$args`: `array` Arguments
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator`
|
||||
|
||||
Send state info for message IDs.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$req_msg_id`: `string|int` Message ID of msgs_state_req that initiated this
|
||||
* `$msg_ids`: `array` Message IDs to send info about
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
21
docs/PHP/danog/MadelineProto/MTProtoTools/AuthKeyHandler.md
Normal file
21
docs/PHP/danog/MadelineProto/MTProtoTools/AuthKeyHandler.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\AuthKeyHandler: Manages the creation of the authorization key.
|
||||
description: https://core.telegram.org/mtproto/auth_key
|
||||
https://core.telegram.org/mtproto/samples-auth_key
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\AuthKeyHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages the creation of the authorization key.
|
||||
|
||||
https://core.telegram.org/mtproto/auth_key
|
||||
https://core.telegram.org/mtproto/samples-auth_key
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it). ## Properties
|
||||
* `$settings`: `\Settings` Settings
|
89
docs/PHP/danog/MadelineProto/MTProtoTools/CallHandler.md
Normal file
89
docs/PHP/danog/MadelineProto/MTProtoTools/CallHandler.md
Normal file
@ -0,0 +1,89 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\CallHandler: Manages method and object calls.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\CallHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages method and object calls.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `methodCall(string $method, array|\Generator $args, array $aargs): mixed`
|
||||
* `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
* `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `methodCall(string $method, array|\Generator $args, array $aargs): mixed`
|
||||
|
||||
Synchronous wrapper for methodCall.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` Method name
|
||||
* `$args`: `array|\Generator` Arguments
|
||||
Full type:
|
||||
```
|
||||
array|\Generator<mixed, mixed, mixed, array>
|
||||
```
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
|
||||
Call method and wait asynchronously for response.
|
||||
If the $aargs['noResponse'] is true, will not wait for a response.
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` Method name
|
||||
* `$args`: `array|\Generator` Arguments
|
||||
Full type:
|
||||
```
|
||||
array|\Generator<mixed, mixed, mixed, array>
|
||||
```
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator`
|
||||
|
||||
Call method and make sure it is asynchronously sent.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` Method name
|
||||
* `$args`: `array|\Generator` Arguments
|
||||
Full type:
|
||||
```
|
||||
array|\Generator<mixed, mixed, mixed, array>
|
||||
```
|
||||
* `$aargs`: `array` Additional arguments
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
* `$settings`: `\Settings` Settings
|
@ -0,0 +1,72 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\CombinedUpdatesState: Stores multiple update states.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\CombinedUpdatesState`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Stores multiple update states.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `get(int $channel, array $init): \danog\MadelineProto\MTProtoTools\UpdatesState|\danog\MadelineProto\MTProtoTools\UpdatesState[]`
|
||||
* `remove(int $channel): void`
|
||||
* `has(int $channel): bool`
|
||||
* `syncLoading(int $channel, bool|null $set): bool`
|
||||
|
||||
## Methods:
|
||||
### `get(int $channel, array $init): \danog\MadelineProto\MTProtoTools\UpdatesState|\danog\MadelineProto\MTProtoTools\UpdatesState[]`
|
||||
|
||||
Get or update multiple parameters.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$channel`: `int` Channel to get info about (optional, if not provided returns the entire info array)
|
||||
* `$init`: `array` Parameters to update
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\danog\MadelineProto\MTProtoTools\UpdatesState`
|
||||
|
||||
|
||||
|
||||
|
||||
### `remove(int $channel): void`
|
||||
|
||||
Remove update state.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$channel`: `int` Channel whose state should be removed
|
||||
|
||||
|
||||
|
||||
### `has(int $channel): bool`
|
||||
|
||||
Check if update state is present.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$channel`: `int` Channel ID
|
||||
|
||||
|
||||
|
||||
### `syncLoading(int $channel, bool|null $set): bool`
|
||||
|
||||
Are we currently busy?
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$channel`: `int` Channel to get info about
|
||||
* `$set`: `bool|null` Busy flag to set before returning
|
||||
|
||||
|
||||
|
405
docs/PHP/danog/MadelineProto/MTProtoTools/Files.md
Normal file
405
docs/PHP/danog/MadelineProto/MTProtoTools/Files.md
Normal file
@ -0,0 +1,405 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\Files: Manages upload and download of files.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\Files`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages upload and download of files.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `uploadFromUrl(string|\danog\MadelineProto\FileCallbackInterface $url, int $size, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
* `uploadFromCallable(mixed $callable, int $size, string $mime, string $fileName, callable $cb, bool $seekable, bool $encrypted): \Generator`
|
||||
* `uploadFromTgfile(mixed $media, callable $cb, bool $encrypted): \Generator`
|
||||
* `getFileInfo(mixed $constructor): \Generator<array>`
|
||||
* `getPropicInfo(mixed $messageMedia): \Generator<array>`
|
||||
* `extractBotAPIFile(array $info): ?array`
|
||||
* `getDownloadInfo(mixed $messageMedia): \Generator<array>`
|
||||
* `downloadToDir(mixed $messageMedia, string|\danog\MadelineProto\FileCallbackInterface $dir, callable $cb): \Generator`
|
||||
* `downloadToFile(mixed $messageMedia, string|\danog\MadelineProto\FileCallbackInterface $file, callable $cb): \Generator Downloaded file path`
|
||||
* `downloadToCallable(mixed $messageMedia, callable|\danog\MadelineProto\FileCallbackInterface $callable, callable $cb, bool $seekable, int $offset, int $end, int $part_size): \Generator`
|
||||
* `downloadToBrowser(array|string $messageMedia, callable $cb): \Generator`
|
||||
* `downloadToStream(mixed $messageMedia, mixed|\danog\MadelineProto\FileCallbackInterface $stream, callable $cb, int $offset, int $end): \Generator`
|
||||
* `downloadToResponse(array|string $messageMedia, \ServerRequest $request, callable $cb): \Generator Returned response`
|
||||
* `uploadEncrypted(\danog\MadelineProto\FileCallbackInterface|string|array $file, string $fileName, callable $cb): \Generator`
|
||||
* `upload(\danog\MadelineProto\FileCallbackInterface|string|array $file, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
* `uploadFromStream(mixed $stream, int $size, string $mime, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `uploadFromUrl(string|\danog\MadelineProto\FileCallbackInterface $url, int $size, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
Upload file from URL.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$url`: `string|\danog\MadelineProto\FileCallbackInterface` URL of file
|
||||
* `$size`: `int` Size of file
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<\Amp\Http\Client\Response>|\Amp\Promise<int>|\Amp\Promise<null|string>|\danog\MadelineProto\Stream\StreamInterface|array|int|mixed, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Promise`
|
||||
* `\Amp\Http\Client\Response`
|
||||
* [`\danog\MadelineProto\Stream\StreamInterface`: Generic stream interface.](../Stream/StreamInterface.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `uploadFromCallable(mixed $callable, int $size, string $mime, string $fileName, callable $cb, bool $seekable, bool $encrypted): \Generator`
|
||||
|
||||
Upload file from callable.
|
||||
The callable must accept two parameters: int $offset, int $size
|
||||
The callable must return a string with the contest of the file at the specified offset and size.
|
||||
|
||||
Parameters:
|
||||
* `$callable`: `mixed` Callable
|
||||
* `$size`: `int` File size
|
||||
* `$mime`: `string` Mime type
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$seekable`: `bool` Whether chunks can be fetched out of order
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise|\Amp\Promise<array>, mixed, array{_: string, id: string, parts: int, name: string, mime_type: string, key_fingerprint?: mixed, key?: mixed, iv?: mixed, md5_checksum: string}>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `uploadFromTgfile(mixed $media, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
Reupload telegram file.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$media`: `mixed` Telegram file
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|array, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getFileInfo(mixed $constructor): \Generator<array>`
|
||||
|
||||
Get info about file.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$constructor`: `mixed` File ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getPropicInfo(mixed $messageMedia): \Generator<array>`
|
||||
|
||||
Get download info of the propic of a user
|
||||
Returns an array with the following structure:.
|
||||
`$info['ext']` - The file extension
|
||||
`$info['name']` - The file name, without the extension
|
||||
`$info['mime']` - The file mime type
|
||||
`$info['size']` - The file size
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `extractBotAPIFile(array $info): ?array`
|
||||
|
||||
Extract file info from bot API message.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$info`: `array` Bot API message object
|
||||
|
||||
|
||||
|
||||
### `getDownloadInfo(mixed $messageMedia): \Generator<array>`
|
||||
|
||||
Get download info of file
|
||||
Returns an array with the following structure:.
|
||||
`$info['ext']` - The file extension
|
||||
`$info['name']` - The file name, without the extension
|
||||
`$info['mime']` - The file mime type
|
||||
`$info['size']` - The file size
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToDir(mixed $messageMedia, string|\danog\MadelineProto\FileCallbackInterface $dir, callable $cb): \Generator`
|
||||
|
||||
Download file to directory.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File to download
|
||||
* `$dir`: `string|\danog\MadelineProto\FileCallbackInterface` Directory where to download the file
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<\Amp\File\File>|\Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<callable|null>|\Amp\Promise<mixed>|array|bool|mixed, mixed, false|string>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Promise`
|
||||
* `\Amp\File\File`
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToFile(mixed $messageMedia, string|\danog\MadelineProto\FileCallbackInterface $file, callable $cb): \Generator Downloaded file path`
|
||||
|
||||
Download file.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File to download
|
||||
* `$file`: `string|\danog\MadelineProto\FileCallbackInterface` Downloaded file path
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
|
||||
|
||||
Return value: Downloaded file path
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<\Amp\File\File>|\Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<callable|null>|\Amp\Promise<mixed>|array|bool|mixed, mixed, false|string>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Promise`
|
||||
* `\Amp\File\File`
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToCallable(mixed $messageMedia, callable|\danog\MadelineProto\FileCallbackInterface $callable, callable $cb, bool $seekable, int $offset, int $end, int $part_size): \Generator`
|
||||
|
||||
Download file to callable.
|
||||
The callable must accept two parameters: string $payload, int $offset
|
||||
The callable will be called (possibly out of order, depending on the value of $seekable).
|
||||
The callable should return the number of written bytes.
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File to download
|
||||
* `$callable`: `callable|\danog\MadelineProto\FileCallbackInterface` Chunk callback
|
||||
* `$cb`: `callable` Status callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$seekable`: `bool` Whether the callable can be called out of order
|
||||
* `$offset`: `int` Offset where to start downloading
|
||||
* `$end`: `int` Offset where to stop downloading (inclusive)
|
||||
* `$part_size`: `int` Size of each chunk
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|array, mixed, true>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToBrowser(array|string $messageMedia, callable $cb): \Generator`
|
||||
|
||||
Download file to browser.
|
||||
Supports HEAD requests and content-ranges for parallel and resumed downloads.
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `array|string` File to download
|
||||
* `$cb`: `callable` Status callback (can also use FileCallback)
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToStream(mixed $messageMedia, mixed|\danog\MadelineProto\FileCallbackInterface $stream, callable $cb, int $offset, int $end): \Generator`
|
||||
|
||||
Download file to stream.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `mixed` File to download
|
||||
* `$stream`: `mixed|\danog\MadelineProto\FileCallbackInterface` Stream where to download file
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$offset`: `int` Offset where to start downloading
|
||||
* `$end`: `int` Offset where to end download
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int, \Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<mixed>|mixed, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `downloadToResponse(array|string $messageMedia, \ServerRequest $request, callable $cb): \Generator Returned response`
|
||||
|
||||
Download file to amphp/http-server response.
|
||||
Supports HEAD requests and content-ranges for parallel and resumed downloads.
|
||||
|
||||
Parameters:
|
||||
* `$messageMedia`: `array|string` File to download
|
||||
* `$request`: `\ServerRequest` Request
|
||||
* `$cb`: `callable` Status callback (can also use FileCallback)
|
||||
|
||||
|
||||
Return value: Returned response
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<mixed, array, mixed, \Amp\Http\Server\Response>
|
||||
```
|
||||
#### See also:
|
||||
* `\ServerRequest`
|
||||
* `\Amp\Http\Server\Response`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `uploadEncrypted(\danog\MadelineProto\FileCallbackInterface|string|array $file, string $fileName, callable $cb): \Generator`
|
||||
|
||||
Upload file to secret chat.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$file`: `\danog\MadelineProto\FileCallbackInterface|string|array` File, URL or Telegram file to upload
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<\Amp\File\File>|\Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<int>|\Amp\Promise<mixed>|\Amp\Promise<null|string>|\danog\MadelineProto\Stream\StreamInterface|array|int|mixed, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Promise`
|
||||
* `\Amp\File\File`
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* [`\danog\MadelineProto\Stream\StreamInterface`: Generic stream interface.](../Stream/StreamInterface.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `upload(\danog\MadelineProto\FileCallbackInterface|string|array $file, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
Upload file.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$file`: `\danog\MadelineProto\FileCallbackInterface|string|array` File, URL or Telegram file to upload
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<\Amp\File\File>|\Amp\Promise<\Amp\Ipc\Sync\ChannelledSocket>|\Amp\Promise<int>|\Amp\Promise<mixed>|\Amp\Promise<null|string>|\danog\MadelineProto\Stream\StreamInterface|array|int|mixed, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\FileCallbackInterface`: File callback interface.](../FileCallbackInterface.md)
|
||||
* `\Amp\Promise`
|
||||
* `\Amp\File\File`
|
||||
* `\Amp\Ipc\Sync\ChannelledSocket`
|
||||
* [`\danog\MadelineProto\Stream\StreamInterface`: Generic stream interface.](../Stream/StreamInterface.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `uploadFromStream(mixed $stream, int $size, string $mime, string $fileName, callable $cb, bool $encrypted): \Generator`
|
||||
|
||||
Upload file from stream.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$stream`: `mixed` PHP resource or AMPHP async stream
|
||||
* `$size`: `int` File size
|
||||
* `$mime`: `string` Mime type
|
||||
* `$fileName`: `string` File name
|
||||
* `$cb`: `callable` Callback (DEPRECATED, use FileCallbackInterface)
|
||||
* `$encrypted`: `bool` Whether to encrypt file for secret chats
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<int>|\Amp\Promise<null|string>|\danog\MadelineProto\Stream\StreamInterface|array|int|mixed, mixed, mixed>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* [`\danog\MadelineProto\Stream\StreamInterface`: Generic stream interface.](../Stream/StreamInterface.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
* `$settings`: `\Settings` Settings
|
49
docs/PHP/danog/MadelineProto/MTProtoTools/MinDatabase.md
Normal file
49
docs/PHP/danog/MadelineProto/MTProtoTools/MinDatabase.md
Normal file
@ -0,0 +1,49 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\MinDatabase: Manages min peers.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\MinDatabase`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages min peers.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* danog\MadelineProto\MTProtoTools\MinDatabase::SWITCH_CONSTRUCTORS:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\MinDatabase::CATCH_PEERS:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\MinDatabase::ORIGINS:
|
||||
|
||||
|
||||
## Method list:
|
||||
* `hasPeer(float|int $id): \Amp\Promise`
|
||||
|
||||
## Methods:
|
||||
### `hasPeer(float|int $id): \Amp\Promise`
|
||||
|
||||
Check if location info is available for peer.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `float|int` Peer ID
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Amp\Promise<bool>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
100
docs/PHP/danog/MadelineProto/MTProtoTools/PasswordCalculator.md
Normal file
100
docs/PHP/danog/MadelineProto/MTProtoTools/PasswordCalculator.md
Normal file
@ -0,0 +1,100 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\PasswordCalculator: Manages SRP password calculation.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\PasswordCalculator`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages SRP password calculation.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `addInfo(array $object): void`
|
||||
* `createSalt(string $prefix): \string Salt`
|
||||
* `hashSha256(string $data, string $salt): \string Hash`
|
||||
* `hashPassword(string $password, string $client_salt, string $server_salt): \string Resulting hash`
|
||||
* `getCheckPassword(string $password): \array InputCheckPassword object`
|
||||
* `getPassword(array $params): \array account.updatePasswordSettings parameters`
|
||||
|
||||
## Methods:
|
||||
### `addInfo(array $object): void`
|
||||
|
||||
Popupate 2FA configuration.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$object`: `array` 2FA configuration object obtained using account.getPassword
|
||||
|
||||
|
||||
|
||||
### `createSalt(string $prefix): \string Salt`
|
||||
|
||||
Create a random string (eventually prefixed by the specified string).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$prefix`: `string` Prefix
|
||||
|
||||
|
||||
Return value: Salt
|
||||
|
||||
|
||||
### `hashSha256(string $data, string $salt): \string Hash`
|
||||
|
||||
Hash specified data using the salt with SHA256.
|
||||
The result will be the SHA256 hash of the salt concatenated with the data concatenated with the salt
|
||||
|
||||
Parameters:
|
||||
* `$data`: `string` Data to hash
|
||||
* `$salt`: `string` Salt
|
||||
|
||||
|
||||
Return value: Hash
|
||||
|
||||
|
||||
### `hashPassword(string $password, string $client_salt, string $server_salt): \string Resulting hash`
|
||||
|
||||
Hashes the specified password.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$password`: `string` Password
|
||||
* `$client_salt`: `string` Client salt
|
||||
* `$server_salt`: `string` Server salt
|
||||
|
||||
|
||||
Return value: Resulting hash
|
||||
|
||||
|
||||
### `getCheckPassword(string $password): \array InputCheckPassword object`
|
||||
|
||||
Get the InputCheckPassword object for checking the validity of a password using account.checkPassword.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$password`: `string` The password
|
||||
|
||||
|
||||
Return value: InputCheckPassword object
|
||||
|
||||
|
||||
### `getPassword(array $params): \array account.updatePasswordSettings parameters`
|
||||
|
||||
Get parameters to be passed to the account.updatePasswordSettings to update/set a 2FA password.
|
||||
The input params array can contain password, new_password, email and hint params.
|
||||
|
||||
Parameters:
|
||||
* `$params`: `array` Input params
|
||||
|
||||
|
||||
Return value: account.updatePasswordSettings parameters
|
||||
|
||||
|
214
docs/PHP/danog/MadelineProto/MTProtoTools/PeerHandler.md
Normal file
214
docs/PHP/danog/MadelineProto/MTProtoTools/PeerHandler.md
Normal file
@ -0,0 +1,214 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\PeerHandler: Manages peers.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\PeerHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages peers.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `toSupergroup(int $id): float|int`
|
||||
* `fromSupergroup(int $id): float|int`
|
||||
* `isSupergroup(int $id): bool`
|
||||
* `addUser(array $user): \Generator`
|
||||
* `peerIsset(mixed $id): \Generator`
|
||||
* `getFolderId(mixed $id): ?int`
|
||||
* `getId(mixed $id): int`
|
||||
* `getInfo(mixed $id, bool $recursive): \Generator Info object`
|
||||
* `fullChatLastUpdated(mixed $id): \Generator<int>`
|
||||
* `getFullInfo(mixed $id): \Generator FullInfo object`
|
||||
* `getPwrChat(mixed $id): \Generator<array> Chat object`
|
||||
* `resolveUsername(string $username): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `toSupergroup(int $id): float|int`
|
||||
|
||||
Convert MTProto channel ID to bot API channel ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `int` MTProto channel ID
|
||||
|
||||
|
||||
|
||||
### `fromSupergroup(int $id): float|int`
|
||||
|
||||
Convert bot API channel ID to MTProto channel ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `int` Bot API channel ID
|
||||
|
||||
|
||||
|
||||
### `isSupergroup(int $id): bool`
|
||||
|
||||
Check whether provided bot API ID is a channel.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `int` Bot API ID
|
||||
|
||||
|
||||
|
||||
### `addUser(array $user): \Generator`
|
||||
|
||||
Add user info.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$user`: `array` User info
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `peerIsset(mixed $id): \Generator`
|
||||
|
||||
Check if peer is present in internal peer database.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `mixed` Peer
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|array, mixed, bool>
|
||||
```
|
||||
#### See also:
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getFolderId(mixed $id): ?int`
|
||||
|
||||
Get folder ID from object.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `mixed` Object
|
||||
|
||||
|
||||
|
||||
### `getId(mixed $id): int`
|
||||
|
||||
Get bot API ID from peer object.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `mixed` Peer
|
||||
|
||||
|
||||
|
||||
### `getInfo(mixed $id, bool $recursive): \Generator Info object`
|
||||
|
||||
Get info about peer, returns an Info object.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `mixed` Peer
|
||||
* `$recursive`: `bool` Internal
|
||||
|
||||
|
||||
Return value: Info object
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}>
|
||||
```
|
||||
#### See also:
|
||||
* [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html)
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `fullChatLastUpdated(mixed $id): \Generator<int>`
|
||||
|
||||
When were full info for this chat last cached.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `mixed` Chat ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getFullInfo(mixed $id): \Generator FullInfo object`
|
||||
|
||||
Get full info about peer, returns an FullInfo object.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `mixed` Peer
|
||||
|
||||
|
||||
Return value: FullInfo object
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, \Amp\Promise|array, mixed, array>
|
||||
```
|
||||
#### See also:
|
||||
* [https://docs.madelineproto.xyz/FullInfo.html](https://docs.madelineproto.xyz/FullInfo.html)
|
||||
* `\Amp\Promise`
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getPwrChat(mixed $id): \Generator<array> Chat object`
|
||||
|
||||
Get full info about peer (including full list of channel members), returns a Chat object.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$id`: `mixed` Peer
|
||||
|
||||
|
||||
Return value: Chat object
|
||||
|
||||
#### See also:
|
||||
* [https://docs.madelineproto.xyz/Chat.html](https://docs.madelineproto.xyz/Chat.html)
|
||||
|
||||
|
||||
|
||||
|
||||
### `resolveUsername(string $username): \Generator`
|
||||
|
||||
Resolve username (use getInfo instead).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$username`: `string` Username
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
## Properties
|
||||
* `$settings`: `\Settings` Settings
|
@ -0,0 +1,49 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\ReferenceDatabase: Manages upload and download of files.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\ReferenceDatabase`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages upload and download of files.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::DOCUMENT_LOCATION:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::PHOTO_LOCATION:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::PHOTO_LOCATION_LOCATION:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::USER_PHOTO_ORIGIN:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::PEER_PHOTO_ORIGIN:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::STICKER_SET_ID_ORIGIN:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::MESSAGE_ORIGIN:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::SAVED_GIFS_ORIGIN:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::STICKER_SET_RECENT_ORIGIN:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::STICKER_SET_FAVED_ORIGIN:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::STICKER_SET_EMOTICON_ORIGIN:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::WALLPAPER_ORIGIN:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::LOCATION_CONTEXT:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::METHOD_CONTEXT:
|
||||
|
||||
* danog\MadelineProto\MTProtoTools\ReferenceDatabase::CONSTRUCTOR_CONTEXT:
|
||||
|
77
docs/PHP/danog/MadelineProto/MTProtoTools/ResponseInfo.md
Normal file
77
docs/PHP/danog/MadelineProto/MTProtoTools/ResponseInfo.md
Normal file
@ -0,0 +1,77 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\ResponseInfo: Obtain response information for file to server.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\ResponseInfo`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Obtain response information for file to server.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `parseHeaders(string $method, array $headers, array $messageMedia): self`
|
||||
* `getCodeExplanation(): string`
|
||||
* `shouldServe(): \bool Whether to serve file`
|
||||
* `getServeRange(): \array HTTP serving range`
|
||||
* `getCode(): \int HTTP response code`
|
||||
* `getHeaders(): \array Header array`
|
||||
|
||||
## Methods:
|
||||
### `parseHeaders(string $method, array $headers, array $messageMedia): self`
|
||||
|
||||
Parse headers.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$method`: `string` HTTP method
|
||||
* `$headers`: `array` HTTP headers
|
||||
* `$messageMedia`: `array` Media info
|
||||
|
||||
|
||||
|
||||
### `getCodeExplanation(): string`
|
||||
|
||||
Get explanation for HTTP code.
|
||||
|
||||
|
||||
|
||||
### `shouldServe(): \bool Whether to serve file`
|
||||
|
||||
Whether to serve file.
|
||||
|
||||
|
||||
Return value: Whether to serve file
|
||||
|
||||
|
||||
### `getServeRange(): \array HTTP serving range`
|
||||
|
||||
Get serving range.
|
||||
|
||||
|
||||
Return value: HTTP serving range
|
||||
|
||||
|
||||
### `getCode(): \int HTTP response code`
|
||||
|
||||
Get HTTP response code.
|
||||
|
||||
|
||||
Return value: HTTP response code
|
||||
|
||||
|
||||
### `getHeaders(): \array Header array`
|
||||
|
||||
Get header array.
|
||||
|
||||
|
||||
Return value: Header array
|
||||
|
||||
|
19
docs/PHP/danog/MadelineProto/MTProtoTools/UpdateHandler.md
Normal file
19
docs/PHP/danog/MadelineProto/MTProtoTools/UpdateHandler.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\UpdateHandler: Manages updates.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\UpdateHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages updates.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it). ## Properties
|
||||
* `$settings`: `\Settings` Settings
|
135
docs/PHP/danog/MadelineProto/MTProtoTools/UpdatesState.md
Normal file
135
docs/PHP/danog/MadelineProto/MTProtoTools/UpdatesState.md
Normal file
@ -0,0 +1,135 @@
|
||||
---
|
||||
title: danog\MadelineProto\MTProtoTools\UpdatesState: Stores the state of updates.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MTProtoTools\UpdatesState`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Stores the state of updates.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `isChannel(): bool`
|
||||
* `getChannel(): int`
|
||||
* `syncLoading(bool|null $set): bool`
|
||||
* `update(array $init): self`
|
||||
* `pts(int $set): \int PTS`
|
||||
* `qts(int $set): \int QTS`
|
||||
* `seq(int $set): \int seq`
|
||||
* `date(int $set): \int Date`
|
||||
* `checkPts(array $update): \int -1 if it's too old, 0 if it's ok, 1 if it's too new`
|
||||
* `checkSeq(int $seq): \int -1 if it's too old, 0 if it's ok, 1 if it's too new`
|
||||
|
||||
## Methods:
|
||||
### `isChannel(): bool`
|
||||
|
||||
Is this state relative to a channel?
|
||||
|
||||
|
||||
|
||||
### `getChannel(): int`
|
||||
|
||||
Get the channel ID.
|
||||
|
||||
|
||||
|
||||
### `syncLoading(bool|null $set): bool`
|
||||
|
||||
Are we currently busy?
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$set`: `bool|null` Update the currently busy flag
|
||||
|
||||
|
||||
|
||||
### `update(array $init): self`
|
||||
|
||||
Update multiple parameters.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$init`: `array` Parameters to update
|
||||
|
||||
|
||||
|
||||
### `pts(int $set): \int PTS`
|
||||
|
||||
Get/set PTS.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$set`: `int` PTS to set
|
||||
|
||||
|
||||
Return value: PTS
|
||||
|
||||
|
||||
### `qts(int $set): \int QTS`
|
||||
|
||||
Get/set QTS.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$set`: `int` QTS to set
|
||||
|
||||
|
||||
Return value: QTS
|
||||
|
||||
|
||||
### `seq(int $set): \int seq`
|
||||
|
||||
Get/set seq.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$set`: `int` Seq to set
|
||||
|
||||
|
||||
Return value: seq
|
||||
|
||||
|
||||
### `date(int $set): \int Date`
|
||||
|
||||
Get/set date.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$set`: `int` Date to set
|
||||
|
||||
|
||||
Return value: Date
|
||||
|
||||
|
||||
### `checkPts(array $update): \int -1 if it's too old, 0 if it's ok, 1 if it's too new`
|
||||
|
||||
Check validity of PTS contained in update.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$update`: `array` Update
|
||||
|
||||
|
||||
Return value: -1 if it's too old, 0 if it's ok, 1 if it's too new
|
||||
|
||||
|
||||
### `checkSeq(int $seq): \int -1 if it's too old, 0 if it's ok, 1 if it's too new`
|
||||
|
||||
Check validity of seq contained in update.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$seq`: `int` Seq
|
||||
|
||||
|
||||
Return value: -1 if it's too old, 0 if it's ok, 1 if it's too new
|
||||
|
||||
|
122
docs/PHP/danog/MadelineProto/MyTelegramOrgWrapper.md
Normal file
122
docs/PHP/danog/MadelineProto/MyTelegramOrgWrapper.md
Normal file
@ -0,0 +1,122 @@
|
||||
---
|
||||
title: danog\MadelineProto\MyTelegramOrgWrapper: Wrapper for my.telegram.org.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\MyTelegramOrgWrapper`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Wrapper for my.telegram.org.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `login(string $number): \Generator`
|
||||
* `completeLogin(string $password): \Generator`
|
||||
* `loggedIn(): bool`
|
||||
* `hasApp(): \Generator`
|
||||
* `getApp(): \Generator`
|
||||
* `createApp(array $settings): \Generator`
|
||||
* `async(bool $async): void`
|
||||
* `loop(callable $callable): mixed`
|
||||
|
||||
## Methods:
|
||||
### `login(string $number): \Generator`
|
||||
|
||||
Login.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$number`: `string` Phone number
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `completeLogin(string $password): \Generator`
|
||||
|
||||
Complete login.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$password`: `string` Password
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `loggedIn(): bool`
|
||||
|
||||
Whether we are logged in.
|
||||
|
||||
|
||||
|
||||
### `hasApp(): \Generator`
|
||||
|
||||
Check if an app was already created.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getApp(): \Generator`
|
||||
|
||||
Get the currently created app.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `createApp(array $settings): \Generator`
|
||||
|
||||
Create an app.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `array` App parameters
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `async(bool $async): void`
|
||||
|
||||
Enable or disable async.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$async`: `bool` Async
|
||||
|
||||
|
||||
|
||||
### `loop(callable $callable): mixed`
|
||||
|
||||
Run specified callable synchronously.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$callable`: `callable` Callable
|
||||
|
||||
|
||||
|
62
docs/PHP/danog/MadelineProto/PTSException.md
Normal file
62
docs/PHP/danog/MadelineProto/PTSException.md
Normal file
@ -0,0 +1,62 @@
|
||||
---
|
||||
title: danog\MadelineProto\PTSException: Internal error indicating a problem with Telegram's servers.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\PTSException`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Internal error indicating a problem with Telegram's servers.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `updateTLTrace(array $trace): void`
|
||||
* `getTLTrace(): string`
|
||||
* `setTLTrace(string $tlTrace): void`
|
||||
* `prettifyTL(string $init, array $trace): void`
|
||||
|
||||
## Methods:
|
||||
### `updateTLTrace(array $trace): void`
|
||||
|
||||
Update TL trace.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$trace`: `array`
|
||||
|
||||
|
||||
|
||||
### `getTLTrace(): string`
|
||||
|
||||
Get TL trace.
|
||||
|
||||
|
||||
|
||||
### `setTLTrace(string $tlTrace): void`
|
||||
|
||||
Set TL trace.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$tlTrace`: `string` TL trace
|
||||
|
||||
|
||||
|
||||
### `prettifyTL(string $init, array $trace): void`
|
||||
|
||||
Generate async trace.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$init`: `string` Method name
|
||||
* `$trace`: `array` Async trace
|
||||
|
||||
|
||||
|
133
docs/PHP/danog/MadelineProto/PsrLogger.md
Normal file
133
docs/PHP/danog/MadelineProto/PsrLogger.md
Normal file
@ -0,0 +1,133 @@
|
||||
---
|
||||
title: danog\MadelineProto\PsrLogger: PSR-3 wrapper for MadelineProto's Logger.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\PsrLogger`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
PSR-3 wrapper for MadelineProto's Logger.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `log(mixed $level, string $message, array $context): void`
|
||||
* `emergency(string $message, array $context): void`
|
||||
* `alert(string $message, array $context): void`
|
||||
* `critical(string $message, array $context): void`
|
||||
* `error(string $message, array $context): void`
|
||||
* `warning(string $message, array $context): void`
|
||||
* `notice(string $message, array $context): void`
|
||||
* `info(string $message, array $context): void`
|
||||
* `debug(string $message, array $context): void`
|
||||
|
||||
## Methods:
|
||||
### `log(mixed $level, string $message, array $context): void`
|
||||
|
||||
Logs with an arbitrary level.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$level`: `mixed`
|
||||
* `$message`: `string`
|
||||
* `$context`: `array`
|
||||
|
||||
|
||||
|
||||
### `emergency(string $message, array $context): void`
|
||||
|
||||
System is unusable.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message`: `string`
|
||||
* `$context`: `array`
|
||||
|
||||
|
||||
|
||||
### `alert(string $message, array $context): void`
|
||||
|
||||
Action must be taken immediately.
|
||||
Example: Entire website down, database unavailable, etc. This should
|
||||
trigger the SMS alerts and wake you up.
|
||||
|
||||
Parameters:
|
||||
* `$message`: `string`
|
||||
* `$context`: `array`
|
||||
|
||||
|
||||
|
||||
### `critical(string $message, array $context): void`
|
||||
|
||||
Critical conditions.
|
||||
Example: Application component unavailable, unexpected exception.
|
||||
|
||||
Parameters:
|
||||
* `$message`: `string`
|
||||
* `$context`: `array`
|
||||
|
||||
|
||||
|
||||
### `error(string $message, array $context): void`
|
||||
|
||||
Runtime errors that do not require immediate action but should typically
|
||||
be logged and monitored.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message`: `string`
|
||||
* `$context`: `array`
|
||||
|
||||
|
||||
|
||||
### `warning(string $message, array $context): void`
|
||||
|
||||
Exceptional occurrences that are not errors.
|
||||
Example: Use of deprecated APIs, poor use of an API, undesirable things
|
||||
that are not necessarily wrong.
|
||||
|
||||
Parameters:
|
||||
* `$message`: `string`
|
||||
* `$context`: `array`
|
||||
|
||||
|
||||
|
||||
### `notice(string $message, array $context): void`
|
||||
|
||||
Normal but significant events.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message`: `string`
|
||||
* `$context`: `array`
|
||||
|
||||
|
||||
|
||||
### `info(string $message, array $context): void`
|
||||
|
||||
Interesting events.
|
||||
Example: User logs in, SQL logs.
|
||||
|
||||
Parameters:
|
||||
* `$message`: `string`
|
||||
* `$context`: `array`
|
||||
|
||||
|
||||
|
||||
### `debug(string $message, array $context): void`
|
||||
|
||||
Detailed debug information.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$message`: `string`
|
||||
* `$context`: `array`
|
||||
|
||||
|
||||
|
80
docs/PHP/danog/MadelineProto/RPCErrorException.md
Normal file
80
docs/PHP/danog/MadelineProto/RPCErrorException.md
Normal file
@ -0,0 +1,80 @@
|
||||
---
|
||||
title: danog\MadelineProto\RPCErrorException: Indicates an error returned by Telegram's API.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\RPCErrorException`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Indicates an error returned by Telegram's API.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getLocalization(): string`
|
||||
* `setLocalization(string $localization): void`
|
||||
* `updateTLTrace(array $trace): void`
|
||||
* `getTLTrace(): string`
|
||||
* `setTLTrace(string $tlTrace): void`
|
||||
* `prettifyTL(string $init, array $trace): void`
|
||||
|
||||
## Methods:
|
||||
### `getLocalization(): string`
|
||||
|
||||
Get localized error name.
|
||||
|
||||
|
||||
|
||||
### `setLocalization(string $localization): void`
|
||||
|
||||
Set localized error name.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$localization`: `string`
|
||||
|
||||
|
||||
|
||||
### `updateTLTrace(array $trace): void`
|
||||
|
||||
Update TL trace.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$trace`: `array`
|
||||
|
||||
|
||||
|
||||
### `getTLTrace(): string`
|
||||
|
||||
Get TL trace.
|
||||
|
||||
|
||||
|
||||
### `setTLTrace(string $tlTrace): void`
|
||||
|
||||
Set TL trace.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$tlTrace`: `string` TL trace
|
||||
|
||||
|
||||
|
||||
### `prettifyTL(string $init, array $trace): void`
|
||||
|
||||
Generate async trace.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$init`: `string` Method name
|
||||
* `$trace`: `array` Async trace
|
||||
|
||||
|
||||
|
54
docs/PHP/danog/MadelineProto/RSA.md
Normal file
54
docs/PHP/danog/MadelineProto/RSA.md
Normal file
@ -0,0 +1,54 @@
|
||||
---
|
||||
title: danog\MadelineProto\RSA: RSA class.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\RSA`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
RSA class.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `load(\danog\MadelineProto\TL\TL $TL, string $rsa_key): \Generator`
|
||||
* `encrypt(string $data): string`
|
||||
|
||||
## Methods:
|
||||
### `load(\danog\MadelineProto\TL\TL $TL, string $rsa_key): \Generator`
|
||||
|
||||
Load RSA key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$TL`: `\danog\MadelineProto\TL\TL` TL serializer
|
||||
* `$rsa_key`: `string` RSA key
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<int|mixed, array|mixed, mixed, self>
|
||||
```
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\TL\TL`: TL serialization.](./TL/TL.md)
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `encrypt(string $data): string`
|
||||
|
||||
Encrypt data.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$data`: `string` Data to encrypt
|
||||
|
||||
|
||||
|
18
docs/PHP/danog/MadelineProto/ResponseException.md
Normal file
18
docs/PHP/danog/MadelineProto/ResponseException.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\ResponseException: Indicates an error thrown when an unexpected response is received from telegram's servers.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\ResponseException`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Indicates an error thrown when an unexpected response is received from telegram's servers.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
120
docs/PHP/danog/MadelineProto/SecretChats/AuthKeyHandler.md
Normal file
120
docs/PHP/danog/MadelineProto/SecretChats/AuthKeyHandler.md
Normal file
@ -0,0 +1,120 @@
|
||||
---
|
||||
title: danog\MadelineProto\SecretChats\AuthKeyHandler: Manages secret chats.
|
||||
description: https://core.telegram.org/api/end-to-end
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\SecretChats\AuthKeyHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages secret chats.
|
||||
|
||||
https://core.telegram.org/api/end-to-end
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `acceptSecretChat(array $params): \Generator`
|
||||
* `requestSecretChat(mixed $user): \Generator`
|
||||
* `rekey(int $chat): \Generator`
|
||||
* `secretChatStatus(int $chat): \int One of MTProto::SECRET_EMPTY, MTProto::SECRET_REQUESTED, MTProto::SECRET_READY`
|
||||
* `getSecretChat(array|int $chat): array`
|
||||
* `hasSecretChat(array|int $chat): bool`
|
||||
* `discardSecretChat(int $chat): \Generator`
|
||||
|
||||
## Methods:
|
||||
### `acceptSecretChat(array $params): \Generator`
|
||||
|
||||
Accept secret chat.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$params`: `array` Secret chat ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `requestSecretChat(mixed $user): \Generator`
|
||||
|
||||
Request secret chat.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$user`: `mixed` User to start secret chat with
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `rekey(int $chat): \Generator`
|
||||
|
||||
Rekey secret chat.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$chat`: `int` Secret chat to rekey
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `secretChatStatus(int $chat): \int One of MTProto::SECRET_EMPTY, MTProto::SECRET_REQUESTED, MTProto::SECRET_READY`
|
||||
|
||||
Get secret chat status.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$chat`: `int` Chat ID
|
||||
|
||||
|
||||
Return value: One of MTProto::SECRET_EMPTY, MTProto::SECRET_REQUESTED, MTProto::SECRET_READY
|
||||
|
||||
|
||||
### `getSecretChat(array|int $chat): array`
|
||||
|
||||
Get secret chat.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$chat`: `array|int` Secret chat ID
|
||||
|
||||
|
||||
|
||||
### `hasSecretChat(array|int $chat): bool`
|
||||
|
||||
Check whether secret chat exists.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$chat`: `array|int` Secret chat ID
|
||||
|
||||
|
||||
|
||||
### `discardSecretChat(int $chat): \Generator`
|
||||
|
||||
Discard secret chat.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$chat`: `int` Secret chat ID
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
18
docs/PHP/danog/MadelineProto/SecretChats/MessageHandler.md
Normal file
18
docs/PHP/danog/MadelineProto/SecretChats/MessageHandler.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\SecretChats\MessageHandler: Manages packing and unpacking of messages, and the list of sent and received messages.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\SecretChats\MessageHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages packing and unpacking of messages, and the list of sent and received messages.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
18
docs/PHP/danog/MadelineProto/SecretChats/ResponseHandler.md
Normal file
18
docs/PHP/danog/MadelineProto/SecretChats/ResponseHandler.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\SecretChats\ResponseHandler: Manages responses.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\SecretChats\ResponseHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages responses.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
18
docs/PHP/danog/MadelineProto/SecretChats/SeqNoHandler.md
Normal file
18
docs/PHP/danog/MadelineProto/SecretChats/SeqNoHandler.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\SecretChats\SeqNoHandler: Manages sequence numbers.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\SecretChats\SeqNoHandler`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages sequence numbers.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
18
docs/PHP/danog/MadelineProto/SecurityException.md
Normal file
18
docs/PHP/danog/MadelineProto/SecurityException.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
title: danog\MadelineProto\SecurityException: Indicates a security error.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\SecurityException`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Indicates a security error.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
23
docs/PHP/danog/MadelineProto/Serialization.md
Normal file
23
docs/PHP/danog/MadelineProto/Serialization.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
title: danog\MadelineProto\Serialization: Manages serialization of the MadelineProto instance.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Serialization`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Manages serialization of the MadelineProto instance.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Constants
|
||||
* danog\MadelineProto\Serialization::PHP_HEADER: Header for session files.
|
||||
|
||||
* danog\MadelineProto\Serialization::VERSION: Serialization version.
|
||||
|
157
docs/PHP/danog/MadelineProto/SessionPaths.md
Normal file
157
docs/PHP/danog/MadelineProto/SessionPaths.md
Normal file
@ -0,0 +1,157 @@
|
||||
---
|
||||
title: danog\MadelineProto\SessionPaths: Session path information.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\SessionPaths`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Session path information.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `serialize(object $object, string $path): \Generator`
|
||||
* `unserialize(string $path): \Generator`
|
||||
* `getLegacySessionPath(): string`
|
||||
* `getSessionPath(): string`
|
||||
* `getLockPath(): string`
|
||||
* `getIpcPath(): string`
|
||||
* `getIpcStatePath(): string`
|
||||
* `getIpcState(): \Amp\Promise<?\danog\MadelineProto\Ipc\IpcState>`
|
||||
* `storeIpcState(): \Generator`
|
||||
* `getLightStatePath(): string`
|
||||
* `getLightState(): \Amp\Promise<\danog\MadelineProto\LightState>`
|
||||
* `storeLightState(): \Generator`
|
||||
* `getIpcCallbackPath(): string`
|
||||
|
||||
## Methods:
|
||||
### `serialize(object $object, string $path): \Generator`
|
||||
|
||||
Serialize object to file.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$object`: `object`
|
||||
* `$path`: `string`
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `unserialize(string $path): \Generator`
|
||||
|
||||
Deserialize new object.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$path`: `string` Object path, defaults to session path
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
\Generator<mixed, mixed, mixed, object>
|
||||
```
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getLegacySessionPath(): string`
|
||||
|
||||
Get legacy session path.
|
||||
|
||||
|
||||
|
||||
### `getSessionPath(): string`
|
||||
|
||||
Get session path.
|
||||
|
||||
|
||||
|
||||
### `getLockPath(): string`
|
||||
|
||||
Get lock path.
|
||||
|
||||
|
||||
|
||||
### `getIpcPath(): string`
|
||||
|
||||
Get IPC socket path.
|
||||
|
||||
|
||||
|
||||
### `getIpcStatePath(): string`
|
||||
|
||||
Get IPC light state path.
|
||||
|
||||
|
||||
|
||||
### `getIpcState(): \Amp\Promise<?\danog\MadelineProto\Ipc\IpcState>`
|
||||
|
||||
Get IPC state.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Ipc\IpcState`: IPC state class.](./Ipc/IpcState.md)
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `storeIpcState(): \Generator`
|
||||
|
||||
Store IPC state.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getLightStatePath(): string`
|
||||
|
||||
Get light state path.
|
||||
|
||||
|
||||
|
||||
### `getLightState(): \Amp\Promise<\danog\MadelineProto\LightState>`
|
||||
|
||||
Get light state.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\danog\MadelineProto\LightState`
|
||||
* `\Amp\Promise`
|
||||
|
||||
|
||||
|
||||
|
||||
### `storeLightState(): \Generator`
|
||||
|
||||
Store light state.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\Generator`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getIpcCallbackPath(): string`
|
||||
|
||||
Get IPC callback socket path.
|
||||
|
||||
|
||||
|
488
docs/PHP/danog/MadelineProto/Settings.md
Normal file
488
docs/PHP/danog/MadelineProto/Settings.md
Normal file
@ -0,0 +1,488 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings: Settings class used for configuring MadelineProto.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings`
|
||||
[Back to index](../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Settings class used for configuring MadelineProto.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `parseFromLegacy(\danog\MadelineProto\SettingsAbstract|array $settings): \danog\MadelineProto\SettingsAbstract`
|
||||
* `mergeArray(array $settings): void`
|
||||
* `merge(\danog\MadelineProto\SettingsAbstract $settings): void`
|
||||
* `getDefaultDc(): int`
|
||||
* `getDefaultDcParams(): array`
|
||||
* `setDefaultDc(int $dc): self`
|
||||
* `getAppInfo(): \danog\MadelineProto\Settings\AppInfo`
|
||||
* `setAppInfo(\danog\MadelineProto\Settings\AppInfo $appInfo): self`
|
||||
* `getAuth(): \danog\MadelineProto\Settings\Auth`
|
||||
* `setAuth(\danog\MadelineProto\Settings\Auth $auth): self`
|
||||
* `getConnection(): \danog\MadelineProto\Settings\Connection`
|
||||
* `setConnection(\danog\MadelineProto\Settings\Connection $connection): self`
|
||||
* `getFiles(): \danog\MadelineProto\Settings\Files`
|
||||
* `setFiles(\danog\MadelineProto\Settings\Files $files): self`
|
||||
* `getLogger(): \danog\MadelineProto\Settings\Logger`
|
||||
* `setLogger(\danog\MadelineProto\Settings\Logger $logger): self`
|
||||
* `getPeer(): \danog\MadelineProto\Settings\Peer`
|
||||
* `setPeer(\danog\MadelineProto\Settings\Peer $peer): self`
|
||||
* `getPwr(): \danog\MadelineProto\Settings\Pwr`
|
||||
* `setPwr(\danog\MadelineProto\Settings\Pwr $pwr): self`
|
||||
* `getRpc(): \danog\MadelineProto\Settings\RPC`
|
||||
* `setRpc(\danog\MadelineProto\Settings\RPC $rpc): self`
|
||||
* `getSecretChats(): \danog\MadelineProto\Settings\SecretChats`
|
||||
* `setSecretChats(\danog\MadelineProto\Settings\SecretChats $secretChats): self`
|
||||
* `getSerialization(): \danog\MadelineProto\Settings\Serialization`
|
||||
* `setSerialization(\danog\MadelineProto\Settings\Serialization $serialization): self`
|
||||
* `getSchema(): \danog\MadelineProto\Settings\TLSchema`
|
||||
* `setSchema(\danog\MadelineProto\Settings\TLSchema $schema): self`
|
||||
* `getDb(): \danog\MadelineProto\Settings\DatabaseAbstract`
|
||||
* `setDb(\danog\MadelineProto\Settings\DatabaseAbstract $db): self`
|
||||
* `getIpc(): \danog\MadelineProto\Settings\Ipc`
|
||||
* `setIpc(\danog\MadelineProto\Settings\Ipc $ipc): self`
|
||||
* `getTemplates(): \danog\MadelineProto\Settings\Templates`
|
||||
* `setTemplates(\danog\MadelineProto\Settings\Templates $templates): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `parseFromLegacy(\danog\MadelineProto\SettingsAbstract|array $settings): \danog\MadelineProto\SettingsAbstract`
|
||||
|
||||
Create settings object from possibly legacy settings array.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\SettingsAbstract|array` Settings
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\danog\MadelineProto\SettingsAbstract`
|
||||
|
||||
|
||||
|
||||
|
||||
### `mergeArray(array $settings): void`
|
||||
|
||||
Merge legacy array settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `array` Settings
|
||||
|
||||
|
||||
|
||||
### `merge(\danog\MadelineProto\SettingsAbstract $settings): void`
|
||||
|
||||
Merge another instance of settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$settings`: `\danog\MadelineProto\SettingsAbstract` Settings
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\danog\MadelineProto\SettingsAbstract`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getDefaultDc(): int`
|
||||
|
||||
Get default DC ID.
|
||||
|
||||
|
||||
|
||||
### `getDefaultDcParams(): array`
|
||||
|
||||
Get default DC params.
|
||||
|
||||
|
||||
|
||||
### `setDefaultDc(int $dc): self`
|
||||
|
||||
Set default DC ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dc`: `int` DC ID
|
||||
|
||||
|
||||
|
||||
### `getAppInfo(): \danog\MadelineProto\Settings\AppInfo`
|
||||
|
||||
Get app information.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\AppInfo`: App information.](AppInfo.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setAppInfo(\danog\MadelineProto\Settings\AppInfo $appInfo): self`
|
||||
|
||||
Set app information.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$appInfo`: `\danog\MadelineProto\Settings\AppInfo` App information.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\AppInfo`: App information.](AppInfo.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getAuth(): \danog\MadelineProto\Settings\Auth`
|
||||
|
||||
Get cryptography settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Auth`: Cryptography settings.](Auth.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setAuth(\danog\MadelineProto\Settings\Auth $auth): self`
|
||||
|
||||
Set cryptography settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$auth`: `\danog\MadelineProto\Settings\Auth` Cryptography settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Auth`: Cryptography settings.](Auth.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getConnection(): \danog\MadelineProto\Settings\Connection`
|
||||
|
||||
Get connection settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Connection`: Connection settings.](Connection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setConnection(\danog\MadelineProto\Settings\Connection $connection): self`
|
||||
|
||||
Set connection settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$connection`: `\danog\MadelineProto\Settings\Connection` Connection settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Connection`: Connection settings.](Connection.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getFiles(): \danog\MadelineProto\Settings\Files`
|
||||
|
||||
Get file management settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Files`: File management settings.](Files.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setFiles(\danog\MadelineProto\Settings\Files $files): self`
|
||||
|
||||
Set file management settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$files`: `\danog\MadelineProto\Settings\Files` File management settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Files`: File management settings.](Files.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getLogger(): \danog\MadelineProto\Settings\Logger`
|
||||
|
||||
Get logger settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Logger`: Logger settings.](Logger.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setLogger(\danog\MadelineProto\Settings\Logger $logger): self`
|
||||
|
||||
Set logger settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$logger`: `\danog\MadelineProto\Settings\Logger` Logger settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Logger`: Logger settings.](Logger.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getPeer(): \danog\MadelineProto\Settings\Peer`
|
||||
|
||||
Get peer database settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Peer`: Peer database settings.](Peer.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setPeer(\danog\MadelineProto\Settings\Peer $peer): self`
|
||||
|
||||
Set peer database settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$peer`: `\danog\MadelineProto\Settings\Peer` Peer database settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Peer`: Peer database settings.](Peer.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getPwr(): \danog\MadelineProto\Settings\Pwr`
|
||||
|
||||
Get PWRTelegram settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Pwr`: PWRTelegram settings.](Pwr.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setPwr(\danog\MadelineProto\Settings\Pwr $pwr): self`
|
||||
|
||||
Set PWRTelegram settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$pwr`: `\danog\MadelineProto\Settings\Pwr` PWRTelegram settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Pwr`: PWRTelegram settings.](Pwr.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getRpc(): \danog\MadelineProto\Settings\RPC`
|
||||
|
||||
Get RPC settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\RPC`: RPC settings.](RPC.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setRpc(\danog\MadelineProto\Settings\RPC $rpc): self`
|
||||
|
||||
Set RPC settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$rpc`: `\danog\MadelineProto\Settings\RPC` RPC settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\RPC`: RPC settings.](RPC.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getSecretChats(): \danog\MadelineProto\Settings\SecretChats`
|
||||
|
||||
Get secret chat settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\SecretChats`: Secret chat settings.](SecretChats.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setSecretChats(\danog\MadelineProto\Settings\SecretChats $secretChats): self`
|
||||
|
||||
Set secret chat settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$secretChats`: `\danog\MadelineProto\Settings\SecretChats` Secret chat settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\SecretChats`: Secret chat settings.](SecretChats.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getSerialization(): \danog\MadelineProto\Settings\Serialization`
|
||||
|
||||
Get serialization settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Serialization`: Serialization settings.](Serialization.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setSerialization(\danog\MadelineProto\Settings\Serialization $serialization): self`
|
||||
|
||||
Set serialization settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$serialization`: `\danog\MadelineProto\Settings\Serialization` Serialization settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Serialization`: Serialization settings.](Serialization.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getSchema(): \danog\MadelineProto\Settings\TLSchema`
|
||||
|
||||
Get TL schema settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\TLSchema`: TL schema settings.](TLSchema.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setSchema(\danog\MadelineProto\Settings\TLSchema $schema): self`
|
||||
|
||||
Set TL schema settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$schema`: `\danog\MadelineProto\Settings\TLSchema` TL schema settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\TLSchema`: TL schema settings.](TLSchema.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getDb(): \danog\MadelineProto\Settings\DatabaseAbstract`
|
||||
|
||||
Get database settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\DatabaseAbstract`: Base class for storage backends.](DatabaseAbstract.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setDb(\danog\MadelineProto\Settings\DatabaseAbstract $db): self`
|
||||
|
||||
Set database settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$db`: `\danog\MadelineProto\Settings\DatabaseAbstract` DatabaseAbstract settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\DatabaseAbstract`: Base class for storage backends.](DatabaseAbstract.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getIpc(): \danog\MadelineProto\Settings\Ipc`
|
||||
|
||||
Get IPC server settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Ipc`: IPC server settings.](Ipc.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setIpc(\danog\MadelineProto\Settings\Ipc $ipc): self`
|
||||
|
||||
Set IPC server settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$ipc`: `\danog\MadelineProto\Settings\Ipc` IPC server settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Ipc`: IPC server settings.](Ipc.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `getTemplates(): \danog\MadelineProto\Settings\Templates`
|
||||
|
||||
Get template settings.
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Templates`: Web and CLI template settings for login.](Templates.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `setTemplates(\danog\MadelineProto\Settings\Templates $templates): self`
|
||||
|
||||
Set template settings.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$templates`: `\danog\MadelineProto\Settings\Templates` Template settings
|
||||
|
||||
|
||||
#### See also:
|
||||
* [`\danog\MadelineProto\Settings\Templates`: Web and CLI template settings for login.](Templates.md)
|
||||
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
161
docs/PHP/danog/MadelineProto/Settings/AppInfo.md
Normal file
161
docs/PHP/danog/MadelineProto/Settings/AppInfo.md
Normal file
@ -0,0 +1,161 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\AppInfo: App information.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\AppInfo`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
App information.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `hasApiInfo(): bool`
|
||||
* `getApiId(): int`
|
||||
* `setApiId(int $apiId): self`
|
||||
* `getApiHash(): string`
|
||||
* `setApiHash(string $apiHash): self`
|
||||
* `getDeviceModel(): string`
|
||||
* `setDeviceModel(string $deviceModel): self`
|
||||
* `getSystemVersion(): string`
|
||||
* `setSystemVersion(string $systemVersion): self`
|
||||
* `getAppVersion(): string`
|
||||
* `setAppVersion(string $appVersion): self`
|
||||
* `getLangCode(): string`
|
||||
* `setLangCode(string $langCode): self`
|
||||
* `getLangPack(): string`
|
||||
* `setLangPack(string $langPack): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `hasApiInfo(): bool`
|
||||
|
||||
Check if the settings have API ID/hash information.
|
||||
|
||||
|
||||
|
||||
### `getApiId(): int`
|
||||
|
||||
Get API ID.
|
||||
|
||||
|
||||
|
||||
### `setApiId(int $apiId): self`
|
||||
|
||||
Set API ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$apiId`: `int` API ID.
|
||||
|
||||
|
||||
|
||||
### `getApiHash(): string`
|
||||
|
||||
Get API hash.
|
||||
|
||||
|
||||
|
||||
### `setApiHash(string $apiHash): self`
|
||||
|
||||
Set API hash.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$apiHash`: `string` API hash.
|
||||
|
||||
|
||||
|
||||
### `getDeviceModel(): string`
|
||||
|
||||
Get device model.
|
||||
|
||||
|
||||
|
||||
### `setDeviceModel(string $deviceModel): self`
|
||||
|
||||
Set device model.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$deviceModel`: `string` Device model.
|
||||
|
||||
|
||||
|
||||
### `getSystemVersion(): string`
|
||||
|
||||
Get system version.
|
||||
|
||||
|
||||
|
||||
### `setSystemVersion(string $systemVersion): self`
|
||||
|
||||
Set system version.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$systemVersion`: `string` System version.
|
||||
|
||||
|
||||
|
||||
### `getAppVersion(): string`
|
||||
|
||||
Get app version.
|
||||
|
||||
|
||||
|
||||
### `setAppVersion(string $appVersion): self`
|
||||
|
||||
Set app version.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$appVersion`: `string` App version.
|
||||
|
||||
|
||||
|
||||
### `getLangCode(): string`
|
||||
|
||||
Get language code.
|
||||
|
||||
|
||||
|
||||
### `setLangCode(string $langCode): self`
|
||||
|
||||
Set language code.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$langCode`: `string` Language code.
|
||||
|
||||
|
||||
|
||||
### `getLangPack(): string`
|
||||
|
||||
Get language pack.
|
||||
|
||||
|
||||
|
||||
### `setLangPack(string $langPack): self`
|
||||
|
||||
Set language pack.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$langPack`: `string` Language pack.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
100
docs/PHP/danog/MadelineProto/Settings/Auth.md
Normal file
100
docs/PHP/danog/MadelineProto/Settings/Auth.md
Normal file
@ -0,0 +1,100 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Auth: Cryptography settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Auth`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Cryptography settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getRsaKeys(): array`
|
||||
* `setRsaKeys(array $rsaKeys): self`
|
||||
* `getDefaultTempAuthKeyExpiresIn(): int`
|
||||
* `setDefaultTempAuthKeyExpiresIn(int $defaultTempAuthKeyExpiresIn): self`
|
||||
* `getPfs(): bool`
|
||||
* `setPfs(bool $pfs): self`
|
||||
* `getMaxAuthTries(): int`
|
||||
* `setMaxAuthTries(int $maxAuthTries): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getRsaKeys(): array`
|
||||
|
||||
Get MTProto public keys array.
|
||||
|
||||
|
||||
|
||||
### `setRsaKeys(array $rsaKeys): self`
|
||||
|
||||
Set MTProto public keys array.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$rsaKeys`: `array` MTProto public keys array.
|
||||
|
||||
|
||||
|
||||
### `getDefaultTempAuthKeyExpiresIn(): int`
|
||||
|
||||
Get validity period of the binding of temporary and permanent keys.
|
||||
|
||||
|
||||
|
||||
### `setDefaultTempAuthKeyExpiresIn(int $defaultTempAuthKeyExpiresIn): self`
|
||||
|
||||
Set validity period of the binding of temporary and permanent keys.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$defaultTempAuthKeyExpiresIn`: `int` Validity period of the binding of temporary and permanent keys.
|
||||
|
||||
|
||||
|
||||
### `getPfs(): bool`
|
||||
|
||||
Get whether to use PFS.
|
||||
|
||||
|
||||
|
||||
### `setPfs(bool $pfs): self`
|
||||
|
||||
Set whether to use PFS.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$pfs`: `bool` Whether to use PFS
|
||||
|
||||
|
||||
|
||||
### `getMaxAuthTries(): int`
|
||||
|
||||
Get max tries for generating auth key.
|
||||
|
||||
|
||||
|
||||
### `setMaxAuthTries(int $maxAuthTries): self`
|
||||
|
||||
Set max tries for generating auth key.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$maxAuthTries`: `int` Max tries for generating auth key
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
365
docs/PHP/danog/MadelineProto/Settings/Connection.md
Normal file
365
docs/PHP/danog/MadelineProto/Settings/Connection.md
Normal file
@ -0,0 +1,365 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Connection: Connection settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Connection`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Connection settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getProtocol(): string`
|
||||
* `setProtocol(class-string<\danog\MadelineProto\Stream\MTProtoBufferInterface> $protocol): self`
|
||||
* `getIpv6(): bool`
|
||||
* `setIpv6(bool $ipv6): self`
|
||||
* `getSslSubdomains(): array`
|
||||
* `setSslSubdomains(array $sslSubdomains): self`
|
||||
* `getMinMediaSocketCount(): int`
|
||||
* `setMinMediaSocketCount(int $minMediaSocketCount): self`
|
||||
* `getMaxMediaSocketCount(): int`
|
||||
* `setMaxMediaSocketCount(int $maxMediaSocketCount): self`
|
||||
* `getRobinPeriod(): int`
|
||||
* `setRobinPeriod(int $robinPeriod): self`
|
||||
* `getDefaultDc(): int`
|
||||
* `getDefaultDcParams(): array`
|
||||
* `setDefaultDc(int $defaultDc): self`
|
||||
* `getProxies(): array`
|
||||
* `addProxy(class-string<\danog\MadelineProto\Stream\StreamInterface> $proxy, array $extra): self`
|
||||
* `setProxy(array $proxies): self`
|
||||
* `clearProxies(): self`
|
||||
* `removeProxy(string $proxy, array $extra): self`
|
||||
* `getObfuscated(): bool`
|
||||
* `setObfuscated(bool $obfuscated): self`
|
||||
* `getTestMode(): bool`
|
||||
* `setTestMode(bool $testMode): self`
|
||||
* `getTransport(): class-string<\danog\MadelineProto\Stream\RawStreamInterface>`
|
||||
* `setTransport(class-string<\danog\MadelineProto\Stream\RawStreamInterface> $transport): self`
|
||||
* `getRetry(): bool`
|
||||
* `setRetry(bool $retry): self`
|
||||
* `getTimeout(): int`
|
||||
* `setTimeout(int $timeout): self`
|
||||
* `getUseDoH(): bool`
|
||||
* `setUseDoH(bool $useDoH): self`
|
||||
* `getBindTo(): ?string`
|
||||
* `setBindTo(?string $bindTo): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getProtocol(): string`
|
||||
|
||||
Get protocol identifier.
|
||||
|
||||
|
||||
|
||||
### `setProtocol(class-string<\danog\MadelineProto\Stream\MTProtoBufferInterface> $protocol): self`
|
||||
|
||||
Set protocol identifier.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$protocol`: `class-string<\danog\MadelineProto\Stream\MTProtoBufferInterface>` Protocol identifier
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\danog\MadelineProto\Stream\MTProtoBufferInterface`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getIpv6(): bool`
|
||||
|
||||
Get whether to use ipv6.
|
||||
|
||||
|
||||
|
||||
### `setIpv6(bool $ipv6): self`
|
||||
|
||||
Set whether to use ipv6.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$ipv6`: `bool` Whether to use ipv6
|
||||
|
||||
|
||||
|
||||
### `getSslSubdomains(): array`
|
||||
|
||||
Get subdomains of web.telegram.org for https protocol.
|
||||
|
||||
|
||||
|
||||
### `setSslSubdomains(array $sslSubdomains): self`
|
||||
|
||||
Set subdomains of web.telegram.org for https protocol.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$sslSubdomains`: `array` Subdomains of web.telegram.org for https protocol.
|
||||
|
||||
|
||||
|
||||
### `getMinMediaSocketCount(): int`
|
||||
|
||||
Get minimum media socket count.
|
||||
|
||||
|
||||
|
||||
### `setMinMediaSocketCount(int $minMediaSocketCount): self`
|
||||
|
||||
Set minimum media socket count.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$minMediaSocketCount`: `int` Minimum media socket count.
|
||||
|
||||
|
||||
|
||||
### `getMaxMediaSocketCount(): int`
|
||||
|
||||
Get maximum media socket count.
|
||||
|
||||
|
||||
|
||||
### `setMaxMediaSocketCount(int $maxMediaSocketCount): self`
|
||||
|
||||
Set maximum media socket count.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$maxMediaSocketCount`: `int` Maximum media socket count.
|
||||
|
||||
|
||||
|
||||
### `getRobinPeriod(): int`
|
||||
|
||||
Get robin period (seconds).
|
||||
|
||||
|
||||
|
||||
### `setRobinPeriod(int $robinPeriod): self`
|
||||
|
||||
Set robin period (seconds).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$robinPeriod`: `int` Robin period (seconds).
|
||||
|
||||
|
||||
|
||||
### `getDefaultDc(): int`
|
||||
|
||||
Get default DC ID.
|
||||
|
||||
|
||||
|
||||
### `getDefaultDcParams(): array`
|
||||
|
||||
Get default DC params.
|
||||
|
||||
|
||||
|
||||
### `setDefaultDc(int $defaultDc): self`
|
||||
|
||||
Set default DC ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$defaultDc`: `int` Default DC ID.
|
||||
|
||||
|
||||
|
||||
### `getProxies(): array`
|
||||
|
||||
Get proxy identifiers.
|
||||
|
||||
|
||||
Fully typed return value:
|
||||
```
|
||||
array<class-string<\danog\MadelineProto\Stream\StreamInterface>, array>
|
||||
```
|
||||
#### See also:
|
||||
* `\danog\MadelineProto\Stream\StreamInterface`
|
||||
|
||||
|
||||
|
||||
|
||||
### `addProxy(class-string<\danog\MadelineProto\Stream\StreamInterface> $proxy, array $extra): self`
|
||||
|
||||
Add proxy identifier to list.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$proxy`: `class-string<\danog\MadelineProto\Stream\StreamInterface>` Proxy identifier
|
||||
* `$extra`: `array` Extra
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\danog\MadelineProto\Stream\StreamInterface`
|
||||
|
||||
|
||||
|
||||
|
||||
### `setProxy(array $proxies): self`
|
||||
|
||||
Set proxies.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$proxies`: `array` Proxies
|
||||
|
||||
|
||||
|
||||
### `clearProxies(): self`
|
||||
|
||||
Clear proxies.
|
||||
|
||||
|
||||
|
||||
### `removeProxy(string $proxy, array $extra): self`
|
||||
|
||||
Remove specific proxy pair.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$proxy`: `string`
|
||||
* `$extra`: `array`
|
||||
|
||||
|
||||
|
||||
### `getObfuscated(): bool`
|
||||
|
||||
Get whether to use the obfuscated protocol.
|
||||
|
||||
|
||||
|
||||
### `setObfuscated(bool $obfuscated): self`
|
||||
|
||||
Set whether to use the obfuscated protocol.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$obfuscated`: `bool` Whether to use the obfuscated protocol.
|
||||
|
||||
|
||||
|
||||
### `getTestMode(): bool`
|
||||
|
||||
Get whether we're in test mode.
|
||||
|
||||
|
||||
|
||||
### `setTestMode(bool $testMode): self`
|
||||
|
||||
Set whether we're in test mode.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$testMode`: `bool` Whether we're in test mode.
|
||||
|
||||
|
||||
|
||||
### `getTransport(): class-string<\danog\MadelineProto\Stream\RawStreamInterface>`
|
||||
|
||||
Get transport identifier.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\danog\MadelineProto\Stream\RawStreamInterface`
|
||||
|
||||
|
||||
|
||||
|
||||
### `setTransport(class-string<\danog\MadelineProto\Stream\RawStreamInterface> $transport): self`
|
||||
|
||||
Set transport identifier.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$transport`: `class-string<\danog\MadelineProto\Stream\RawStreamInterface>` Transport identifier.
|
||||
|
||||
|
||||
#### See also:
|
||||
* `\danog\MadelineProto\Stream\RawStreamInterface`
|
||||
|
||||
|
||||
|
||||
|
||||
### `getRetry(): bool`
|
||||
|
||||
Get whether to retry connection.
|
||||
|
||||
|
||||
|
||||
### `setRetry(bool $retry): self`
|
||||
|
||||
Set whether to retry connection.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$retry`: `bool` Whether to retry connection.
|
||||
|
||||
|
||||
|
||||
### `getTimeout(): int`
|
||||
|
||||
Get connection timeout.
|
||||
|
||||
|
||||
|
||||
### `setTimeout(int $timeout): self`
|
||||
|
||||
Set connection timeout.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$timeout`: `int` Connection timeout.
|
||||
|
||||
|
||||
|
||||
### `getUseDoH(): bool`
|
||||
|
||||
Get whether to use DNS over HTTPS.
|
||||
|
||||
|
||||
|
||||
### `setUseDoH(bool $useDoH): self`
|
||||
|
||||
Set whether to use DNS over HTTPS.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$useDoH`: `bool` Whether to use DNS over HTTPS
|
||||
|
||||
|
||||
|
||||
### `getBindTo(): ?string`
|
||||
|
||||
Get bind on specific address and port.
|
||||
|
||||
|
||||
|
||||
### `setBindTo(?string $bindTo): self`
|
||||
|
||||
Set bind on specific address and port.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$bindTo`: `?string` Bind on specific address and port.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
@ -0,0 +1,107 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Database\DatabaseAbstract: Base class for database backends.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Database\DatabaseAbstract`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Base class for database backends.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getKey(): string`
|
||||
* `getCacheTtl(): int`
|
||||
* `setCacheTtl(int|string $cacheTtl): self`
|
||||
* `getPassword(): string`
|
||||
* `setPassword(string $password): self`
|
||||
* `getDatabase(): string|int`
|
||||
* `getUri(): string`
|
||||
* `setDatabase(int|string $database): self`
|
||||
* `setUri(string $uri): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getKey(): string`
|
||||
|
||||
Get DB key.
|
||||
|
||||
|
||||
|
||||
### `getCacheTtl(): int`
|
||||
|
||||
Get for how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `setCacheTtl(int|string $cacheTtl): self`
|
||||
|
||||
Set for how long to keep records in memory after last read, for cached backends.
|
||||
The cache TTL identifier can be a string like '+5 minutes'.
|
||||
|
||||
Parameters:
|
||||
* `$cacheTtl`: `int|string` For how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `getPassword(): string`
|
||||
|
||||
Get password.
|
||||
|
||||
|
||||
|
||||
### `setPassword(string $password): self`
|
||||
|
||||
Set password.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$password`: `string` Password.
|
||||
|
||||
|
||||
|
||||
### `getDatabase(): string|int`
|
||||
|
||||
Get database name/ID.
|
||||
|
||||
|
||||
|
||||
### `getUri(): string`
|
||||
|
||||
Get database URI.
|
||||
|
||||
|
||||
|
||||
### `setDatabase(int|string $database): self`
|
||||
|
||||
Set database name/ID.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$database`: `int|string`
|
||||
|
||||
|
||||
|
||||
### `setUri(string $uri): self`
|
||||
|
||||
Set database URI.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$uri`: `string`
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
46
docs/PHP/danog/MadelineProto/Settings/Database/Memory.md
Normal file
46
docs/PHP/danog/MadelineProto/Settings/Database/Memory.md
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Database\Memory: Memory backend settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Database\Memory`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Memory backend settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getCleanup(): bool`
|
||||
* `setCleanup(bool $cleanup): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getCleanup(): bool`
|
||||
|
||||
Get whether to cleanup the memory before serializing.
|
||||
|
||||
|
||||
|
||||
### `setCleanup(bool $cleanup): self`
|
||||
|
||||
Set whether to cleanup the memory before serializing.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$cleanup`: `bool` Whether to cleanup the memory before serializing.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
161
docs/PHP/danog/MadelineProto/Settings/Database/Mysql.md
Normal file
161
docs/PHP/danog/MadelineProto/Settings/Database/Mysql.md
Normal file
@ -0,0 +1,161 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Database\Mysql: MySQL backend settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Database\Mysql`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
MySQL backend settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getMaxConnections(): int`
|
||||
* `setMaxConnections(int $maxConnections): self`
|
||||
* `getIdleTimeout(): int`
|
||||
* `setIdleTimeout(int $idleTimeout): self`
|
||||
* `getDatabase(): string`
|
||||
* `setDatabase(string $database): self`
|
||||
* `getUsername(): string`
|
||||
* `setUsername(string $username): self`
|
||||
* `getUri(): string`
|
||||
* `setUri(string $uri): self`
|
||||
* `getKey(): string`
|
||||
* `getCacheTtl(): int`
|
||||
* `setCacheTtl(int|string $cacheTtl): self`
|
||||
* `getPassword(): string`
|
||||
* `setPassword(string $password): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getMaxConnections(): int`
|
||||
|
||||
Get maximum connection limit.
|
||||
|
||||
|
||||
|
||||
### `setMaxConnections(int $maxConnections): self`
|
||||
|
||||
Set maximum connection limit.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$maxConnections`: `int` Maximum connection limit.
|
||||
|
||||
|
||||
|
||||
### `getIdleTimeout(): int`
|
||||
|
||||
Get idle timeout.
|
||||
|
||||
|
||||
|
||||
### `setIdleTimeout(int $idleTimeout): self`
|
||||
|
||||
Set idle timeout.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$idleTimeout`: `int` Idle timeout.
|
||||
|
||||
|
||||
|
||||
### `getDatabase(): string`
|
||||
|
||||
Get database name.
|
||||
|
||||
|
||||
|
||||
### `setDatabase(string $database): self`
|
||||
|
||||
Set database name.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$database`: `string` Database name.
|
||||
|
||||
|
||||
|
||||
### `getUsername(): string`
|
||||
|
||||
Get username.
|
||||
|
||||
|
||||
|
||||
### `setUsername(string $username): self`
|
||||
|
||||
Set username.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$username`: `string` Username.
|
||||
|
||||
|
||||
|
||||
### `getUri(): string`
|
||||
|
||||
Get database URI.
|
||||
|
||||
|
||||
|
||||
### `setUri(string $uri): self`
|
||||
|
||||
Set database URI.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$uri`: `string` Database URI.
|
||||
|
||||
|
||||
|
||||
### `getKey(): string`
|
||||
|
||||
Get DB key.
|
||||
|
||||
|
||||
|
||||
### `getCacheTtl(): int`
|
||||
|
||||
Get for how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `setCacheTtl(int|string $cacheTtl): self`
|
||||
|
||||
Set for how long to keep records in memory after last read, for cached backends.
|
||||
The cache TTL identifier can be a string like '+5 minutes'.
|
||||
|
||||
Parameters:
|
||||
* `$cacheTtl`: `int|string` For how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `getPassword(): string`
|
||||
|
||||
Get password.
|
||||
|
||||
|
||||
|
||||
### `setPassword(string $password): self`
|
||||
|
||||
Set password.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$password`: `string` Password.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
161
docs/PHP/danog/MadelineProto/Settings/Database/Postgres.md
Normal file
161
docs/PHP/danog/MadelineProto/Settings/Database/Postgres.md
Normal file
@ -0,0 +1,161 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Database\Postgres: Postgres backend settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Database\Postgres`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Postgres backend settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getMaxConnections(): int`
|
||||
* `setMaxConnections(int $maxConnections): self`
|
||||
* `getIdleTimeout(): int`
|
||||
* `setIdleTimeout(int $idleTimeout): self`
|
||||
* `getDatabase(): string`
|
||||
* `setDatabase(string $database): self`
|
||||
* `getUsername(): string`
|
||||
* `setUsername(string $username): self`
|
||||
* `getUri(): string`
|
||||
* `setUri(string $uri): self`
|
||||
* `getKey(): string`
|
||||
* `getCacheTtl(): int`
|
||||
* `setCacheTtl(int|string $cacheTtl): self`
|
||||
* `getPassword(): string`
|
||||
* `setPassword(string $password): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getMaxConnections(): int`
|
||||
|
||||
Get maximum connection limit.
|
||||
|
||||
|
||||
|
||||
### `setMaxConnections(int $maxConnections): self`
|
||||
|
||||
Set maximum connection limit.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$maxConnections`: `int` Maximum connection limit.
|
||||
|
||||
|
||||
|
||||
### `getIdleTimeout(): int`
|
||||
|
||||
Get idle timeout.
|
||||
|
||||
|
||||
|
||||
### `setIdleTimeout(int $idleTimeout): self`
|
||||
|
||||
Set idle timeout.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$idleTimeout`: `int` Idle timeout.
|
||||
|
||||
|
||||
|
||||
### `getDatabase(): string`
|
||||
|
||||
Get database name.
|
||||
|
||||
|
||||
|
||||
### `setDatabase(string $database): self`
|
||||
|
||||
Set database name.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$database`: `string` Database name.
|
||||
|
||||
|
||||
|
||||
### `getUsername(): string`
|
||||
|
||||
Get username.
|
||||
|
||||
|
||||
|
||||
### `setUsername(string $username): self`
|
||||
|
||||
Set username.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$username`: `string` Username.
|
||||
|
||||
|
||||
|
||||
### `getUri(): string`
|
||||
|
||||
Get database URI.
|
||||
|
||||
|
||||
|
||||
### `setUri(string $uri): self`
|
||||
|
||||
Set database URI.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$uri`: `string` Database URI.
|
||||
|
||||
|
||||
|
||||
### `getKey(): string`
|
||||
|
||||
Get DB key.
|
||||
|
||||
|
||||
|
||||
### `getCacheTtl(): int`
|
||||
|
||||
Get for how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `setCacheTtl(int|string $cacheTtl): self`
|
||||
|
||||
Set for how long to keep records in memory after last read, for cached backends.
|
||||
The cache TTL identifier can be a string like '+5 minutes'.
|
||||
|
||||
Parameters:
|
||||
* `$cacheTtl`: `int|string` For how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `getPassword(): string`
|
||||
|
||||
Get password.
|
||||
|
||||
|
||||
|
||||
### `setPassword(string $password): self`
|
||||
|
||||
Set password.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$password`: `string` Password.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
107
docs/PHP/danog/MadelineProto/Settings/Database/Redis.md
Normal file
107
docs/PHP/danog/MadelineProto/Settings/Database/Redis.md
Normal file
@ -0,0 +1,107 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Database\Redis: Redis backend settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Database\Redis`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Redis backend settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getDatabase(): int`
|
||||
* `setDatabase(int $database): self`
|
||||
* `getUri(): string`
|
||||
* `setUri(string $uri): self`
|
||||
* `getKey(): string`
|
||||
* `getCacheTtl(): int`
|
||||
* `setCacheTtl(int|string $cacheTtl): self`
|
||||
* `getPassword(): string`
|
||||
* `setPassword(string $password): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getDatabase(): int`
|
||||
|
||||
Get database number.
|
||||
|
||||
|
||||
|
||||
### `setDatabase(int $database): self`
|
||||
|
||||
Set database number.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$database`: `int` Database number.
|
||||
|
||||
|
||||
|
||||
### `getUri(): string`
|
||||
|
||||
Get database URI.
|
||||
|
||||
|
||||
|
||||
### `setUri(string $uri): self`
|
||||
|
||||
Set database URI.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$uri`: `string` Database URI.
|
||||
|
||||
|
||||
|
||||
### `getKey(): string`
|
||||
|
||||
Get DB key.
|
||||
|
||||
|
||||
|
||||
### `getCacheTtl(): int`
|
||||
|
||||
Get for how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `setCacheTtl(int|string $cacheTtl): self`
|
||||
|
||||
Set for how long to keep records in memory after last read, for cached backends.
|
||||
The cache TTL identifier can be a string like '+5 minutes'.
|
||||
|
||||
Parameters:
|
||||
* `$cacheTtl`: `int|string` For how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `getPassword(): string`
|
||||
|
||||
Get password.
|
||||
|
||||
|
||||
|
||||
### `setPassword(string $password): self`
|
||||
|
||||
Set password.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$password`: `string` Password.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
161
docs/PHP/danog/MadelineProto/Settings/Database/SqlAbstract.md
Normal file
161
docs/PHP/danog/MadelineProto/Settings/Database/SqlAbstract.md
Normal file
@ -0,0 +1,161 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Database\SqlAbstract: Generic db backend settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Database\SqlAbstract`
|
||||
[Back to index](../../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Generic db backend settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getMaxConnections(): int`
|
||||
* `setMaxConnections(int $maxConnections): self`
|
||||
* `getIdleTimeout(): int`
|
||||
* `setIdleTimeout(int $idleTimeout): self`
|
||||
* `getDatabase(): string`
|
||||
* `setDatabase(string $database): self`
|
||||
* `getUsername(): string`
|
||||
* `setUsername(string $username): self`
|
||||
* `getUri(): string`
|
||||
* `setUri(string $uri): self`
|
||||
* `getKey(): string`
|
||||
* `getCacheTtl(): int`
|
||||
* `setCacheTtl(int|string $cacheTtl): self`
|
||||
* `getPassword(): string`
|
||||
* `setPassword(string $password): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getMaxConnections(): int`
|
||||
|
||||
Get maximum connection limit.
|
||||
|
||||
|
||||
|
||||
### `setMaxConnections(int $maxConnections): self`
|
||||
|
||||
Set maximum connection limit.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$maxConnections`: `int` Maximum connection limit.
|
||||
|
||||
|
||||
|
||||
### `getIdleTimeout(): int`
|
||||
|
||||
Get idle timeout.
|
||||
|
||||
|
||||
|
||||
### `setIdleTimeout(int $idleTimeout): self`
|
||||
|
||||
Set idle timeout.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$idleTimeout`: `int` Idle timeout.
|
||||
|
||||
|
||||
|
||||
### `getDatabase(): string`
|
||||
|
||||
Get database name.
|
||||
|
||||
|
||||
|
||||
### `setDatabase(string $database): self`
|
||||
|
||||
Set database name.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$database`: `string` Database name.
|
||||
|
||||
|
||||
|
||||
### `getUsername(): string`
|
||||
|
||||
Get username.
|
||||
|
||||
|
||||
|
||||
### `setUsername(string $username): self`
|
||||
|
||||
Set username.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$username`: `string` Username.
|
||||
|
||||
|
||||
|
||||
### `getUri(): string`
|
||||
|
||||
Get database URI.
|
||||
|
||||
|
||||
|
||||
### `setUri(string $uri): self`
|
||||
|
||||
Set database URI.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$uri`: `string` Database URI.
|
||||
|
||||
|
||||
|
||||
### `getKey(): string`
|
||||
|
||||
Get DB key.
|
||||
|
||||
|
||||
|
||||
### `getCacheTtl(): int`
|
||||
|
||||
Get for how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `setCacheTtl(int|string $cacheTtl): self`
|
||||
|
||||
Set for how long to keep records in memory after last read, for cached backends.
|
||||
The cache TTL identifier can be a string like '+5 minutes'.
|
||||
|
||||
Parameters:
|
||||
* `$cacheTtl`: `int|string` For how long to keep records in memory after last read, for cached backends.
|
||||
|
||||
|
||||
|
||||
### `getPassword(): string`
|
||||
|
||||
Get password.
|
||||
|
||||
|
||||
|
||||
### `setPassword(string $password): self`
|
||||
|
||||
Set password.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$password`: `string` Password.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
28
docs/PHP/danog/MadelineProto/Settings/DatabaseAbstract.md
Normal file
28
docs/PHP/danog/MadelineProto/Settings/DatabaseAbstract.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\DatabaseAbstract: Base class for storage backends.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\DatabaseAbstract`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Base class for storage backends.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
100
docs/PHP/danog/MadelineProto/Settings/Files.md
Normal file
100
docs/PHP/danog/MadelineProto/Settings/Files.md
Normal file
@ -0,0 +1,100 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Files: File management settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Files`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
File management settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getAllowAutomaticUpload(): bool`
|
||||
* `setAllowAutomaticUpload(bool $allowAutomaticUpload): self`
|
||||
* `getUploadParallelChunks(): int`
|
||||
* `setUploadParallelChunks(int $uploadParallelChunks): self`
|
||||
* `getDownloadParallelChunks(): int`
|
||||
* `setDownloadParallelChunks(int $downloadParallelChunks): self`
|
||||
* `getReportBrokenMedia(): bool`
|
||||
* `setReportBrokenMedia(bool $reportBrokenMedia): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getAllowAutomaticUpload(): bool`
|
||||
|
||||
Get allow automatic upload of files from file paths present in constructors?
|
||||
|
||||
|
||||
|
||||
### `setAllowAutomaticUpload(bool $allowAutomaticUpload): self`
|
||||
|
||||
Set allow automatic upload of files from file paths present in constructors?
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$allowAutomaticUpload`: `bool` Allow automatic upload of files from file paths present in constructors?
|
||||
|
||||
|
||||
|
||||
### `getUploadParallelChunks(): int`
|
||||
|
||||
Get upload parallel chunk count.
|
||||
|
||||
|
||||
|
||||
### `setUploadParallelChunks(int $uploadParallelChunks): self`
|
||||
|
||||
Set upload parallel chunk count.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$uploadParallelChunks`: `int` Upload parallel chunk count
|
||||
|
||||
|
||||
|
||||
### `getDownloadParallelChunks(): int`
|
||||
|
||||
Get download parallel chunk count.
|
||||
|
||||
|
||||
|
||||
### `setDownloadParallelChunks(int $downloadParallelChunks): self`
|
||||
|
||||
Set download parallel chunk count.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$downloadParallelChunks`: `int` Download parallel chunk count
|
||||
|
||||
|
||||
|
||||
### `getReportBrokenMedia(): bool`
|
||||
|
||||
Get whether to report undownloadable media to TSF.
|
||||
|
||||
|
||||
|
||||
### `setReportBrokenMedia(bool $reportBrokenMedia): self`
|
||||
|
||||
Set whether to report undownloadable media to TSF.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$reportBrokenMedia`: `bool` Whether to report undownloadable media to TSF
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
46
docs/PHP/danog/MadelineProto/Settings/Ipc.md
Normal file
46
docs/PHP/danog/MadelineProto/Settings/Ipc.md
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Ipc: IPC server settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Ipc`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
IPC server settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getSlow(): bool`
|
||||
* `setSlow(bool $slow): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getSlow(): bool`
|
||||
|
||||
Get WARNING: this will cause slow startup if enabled.
|
||||
|
||||
|
||||
|
||||
### `setSlow(bool $slow): self`
|
||||
|
||||
Whether to force full deserialization of instance, without using the IPC server/client.
|
||||
WARNING: this will cause slow startup if enabled.
|
||||
|
||||
Parameters:
|
||||
* `$slow`: `bool` WARNING: this will cause slow startup if enabled.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
92
docs/PHP/danog/MadelineProto/Settings/Logger.md
Normal file
92
docs/PHP/danog/MadelineProto/Settings/Logger.md
Normal file
@ -0,0 +1,92 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Logger: Logger settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Logger`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Logger settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getType()`
|
||||
* `setType(): self`
|
||||
* `getExtra(): null|callable|string`
|
||||
* `setExtra(null|callable|string $extra): self`
|
||||
* `getLevel()`
|
||||
* `setLevel(): self`
|
||||
* `getMaxSize(): int`
|
||||
* `setMaxSize(int $maxSize): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getType()`
|
||||
|
||||
Get $type Logger type.
|
||||
|
||||
|
||||
|
||||
### `setType(): self`
|
||||
|
||||
Set $type Logger type.
|
||||
|
||||
|
||||
|
||||
### `getExtra(): null|callable|string`
|
||||
|
||||
Get extra parameter for logger.
|
||||
|
||||
|
||||
|
||||
### `setExtra(null|callable|string $extra): self`
|
||||
|
||||
Set extra parameter for logger.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$extra`: `null|callable|string` Extra parameter for logger.
|
||||
|
||||
|
||||
|
||||
### `getLevel()`
|
||||
|
||||
Get logging level.
|
||||
|
||||
|
||||
|
||||
### `setLevel(): self`
|
||||
|
||||
Set logging level.
|
||||
|
||||
|
||||
|
||||
### `getMaxSize(): int`
|
||||
|
||||
Get maximum filesize for logger, in case of file logging.
|
||||
|
||||
|
||||
|
||||
### `setMaxSize(int $maxSize): self`
|
||||
|
||||
Set maximum filesize for logger, in case of file logging.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$maxSize`: `int` Maximum filesize for logger, in case of file logging.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
82
docs/PHP/danog/MadelineProto/Settings/Peer.md
Normal file
82
docs/PHP/danog/MadelineProto/Settings/Peer.md
Normal file
@ -0,0 +1,82 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Peer: Peer database settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Peer`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
Peer database settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getFullInfoCacheTime(): int`
|
||||
* `setFullInfoCacheTime(int $fullInfoCacheTime): self`
|
||||
* `getFullFetch(): bool`
|
||||
* `setFullFetch(bool $fullFetch): self`
|
||||
* `getCacheAllPeersOnStartup(): bool`
|
||||
* `setCacheAllPeersOnStartup(bool $cacheAllPeersOnStartup): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getFullInfoCacheTime(): int`
|
||||
|
||||
Get cache time for full peer information (seconds).
|
||||
|
||||
|
||||
|
||||
### `setFullInfoCacheTime(int $fullInfoCacheTime): self`
|
||||
|
||||
Set cache time for full peer information (seconds).
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$fullInfoCacheTime`: `int` Cache time for full peer information (seconds).
|
||||
|
||||
|
||||
|
||||
### `getFullFetch(): bool`
|
||||
|
||||
Get should madeline fetch the full member list of every group it meets?
|
||||
|
||||
|
||||
|
||||
### `setFullFetch(bool $fullFetch): self`
|
||||
|
||||
Set should madeline fetch the full member list of every group it meets?
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$fullFetch`: `bool` Should madeline fetch the full member list of every group it meets?
|
||||
|
||||
|
||||
|
||||
### `getCacheAllPeersOnStartup(): bool`
|
||||
|
||||
Get whether to cache all peers on startup for userbots.
|
||||
|
||||
|
||||
|
||||
### `setCacheAllPeersOnStartup(bool $cacheAllPeersOnStartup): self`
|
||||
|
||||
Set whether to cache all peers on startup for userbots.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$cacheAllPeersOnStartup`: `bool` Whether to cache all peers on startup for userbots.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
64
docs/PHP/danog/MadelineProto/Settings/Pwr.md
Normal file
64
docs/PHP/danog/MadelineProto/Settings/Pwr.md
Normal file
@ -0,0 +1,64 @@
|
||||
---
|
||||
title: danog\MadelineProto\Settings\Pwr: PWRTelegram settings.
|
||||
description:
|
||||
|
||||
---
|
||||
# `danog\MadelineProto\Settings\Pwr`
|
||||
[Back to index](../../../index.md)
|
||||
|
||||
> Author: Daniil Gentili <daniil@daniil.it>
|
||||
|
||||
|
||||
PWRTelegram settings.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
Generated by [danog/phpdoc](https://phpdoc.daniil.it).
|
||||
## Method list:
|
||||
* `getRequests(): bool`
|
||||
* `setRequests(bool $requests): self`
|
||||
* `getDbToken(): string`
|
||||
* `setDbToken(string $dbToken): self`
|
||||
* `hasChanged(): bool`
|
||||
|
||||
## Methods:
|
||||
### `getRequests(): bool`
|
||||
|
||||
Get whether to try resolving usernames using PWRTelegram DB.
|
||||
|
||||
|
||||
|
||||
### `setRequests(bool $requests): self`
|
||||
|
||||
Set whether to try resolving usernames using PWRTelegram DB.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$requests`: `bool` Whether to try resolving usernames using PWRTelegram DB.
|
||||
|
||||
|
||||
|
||||
### `getDbToken(): string`
|
||||
|
||||
Get DB token.
|
||||
|
||||
|
||||
|
||||
### `setDbToken(string $dbToken): self`
|
||||
|
||||
Set DB token.
|
||||
|
||||
|
||||
Parameters:
|
||||
* `$dbToken`: `string` DB token.
|
||||
|
||||
|
||||
|
||||
### `hasChanged(): bool`
|
||||
|
||||
Get whether this setting was changed, also applies changes.
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user