From 6459cf72fd05bd93853c3a5df6f0575c2b51b958 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 3 Jun 2017 20:19:05 +0200 Subject: [PATCH] Added missing methods --- README.md | 9 +++++ .../constructors/documentAttributeAudio_46.md | 37 ++++++++++++++++++ .../documentAttributeSticker_55.md | 36 ++++++++++++++++++ .../constructors/documentAttributeVideo_66.md | 38 +++++++++++++++++++ docs/index.md | 9 +++++ 5 files changed, 129 insertions(+) create mode 100644 docs/API_docs/constructors/documentAttributeAudio_46.md create mode 100644 docs/API_docs/constructors/documentAttributeSticker_55.md create mode 100644 docs/API_docs/constructors/documentAttributeVideo_66.md diff --git a/README.md b/README.md index 876b26288..656965127 100644 --- a/README.md +++ b/README.md @@ -360,6 +360,15 @@ Works exactly like the [socket_send](http://php.net/manual/en/function.socket-se Works exactly like the [socket_close](http://php.net/manual/en/function.socket-close.php) function. +```public function getPeerName(bool $port = true);``` + +Works like [socket_getpeername](http://php.net/manual/en/function.socket-getpeername.php): the difference is that it returns an array with the `host` and the `port`. + + +```public function getSockName(bool $port = true);``` + +Works like [socket_getsockname](http://php.net/manual/en/function.socket-getsockname.php): the difference is that it returns an array with the `host` and the `port`. + ### Uploading and downloading files diff --git a/docs/API_docs/constructors/documentAttributeAudio_46.md b/docs/API_docs/constructors/documentAttributeAudio_46.md new file mode 100644 index 000000000..2fed3727b --- /dev/null +++ b/docs/API_docs/constructors/documentAttributeAudio_46.md @@ -0,0 +1,37 @@ +--- +title: documentAttributeAudio +description: documentAttributeAudio attributes, type and example +--- +## Constructor: documentAttributeAudio\_46 +[Back to constructors index](index.md) + + + +### Attributes: + +| Name | Type | Required | +|----------|:-------------:|---------:| +|duration|[int](../types/int.md) | Yes| +|title|[string](../types/string.md) | Yes| +|performer|[string](../types/string.md) | Yes| + + + +### Type: [DocumentAttribute](../types/DocumentAttribute.md) + + +### Example: + +``` +$documentAttributeAudio_46 = ['_' => 'documentAttributeAudio', 'duration' => int, 'title' => string, 'performer' => string, ]; +``` + +Or, if you're into Lua: + + +``` +documentAttributeAudio_46={_='documentAttributeAudio', duration=int, title=string, performer=string, } + +``` + + diff --git a/docs/API_docs/constructors/documentAttributeSticker_55.md b/docs/API_docs/constructors/documentAttributeSticker_55.md new file mode 100644 index 000000000..f10216b36 --- /dev/null +++ b/docs/API_docs/constructors/documentAttributeSticker_55.md @@ -0,0 +1,36 @@ +--- +title: documentAttributeSticker +description: documentAttributeSticker attributes, type and example +--- +## Constructor: documentAttributeSticker\_55 +[Back to constructors index](index.md) + + + +### Attributes: + +| Name | Type | Required | +|----------|:-------------:|---------:| +|alt|[string](../types/string.md) | Yes| +|stickerset|[InputStickerSet](../types/InputStickerSet.md) | Yes| + + + +### Type: [DocumentAttribute](../types/DocumentAttribute.md) + + +### Example: + +``` +$documentAttributeSticker_55 = ['_' => 'documentAttributeSticker', 'alt' => string, 'stickerset' => InputStickerSet, ]; +``` + +Or, if you're into Lua: + + +``` +documentAttributeSticker_55={_='documentAttributeSticker', alt=string, stickerset=InputStickerSet, } + +``` + + diff --git a/docs/API_docs/constructors/documentAttributeVideo_66.md b/docs/API_docs/constructors/documentAttributeVideo_66.md new file mode 100644 index 000000000..e20de5432 --- /dev/null +++ b/docs/API_docs/constructors/documentAttributeVideo_66.md @@ -0,0 +1,38 @@ +--- +title: documentAttributeVideo +description: documentAttributeVideo attributes, type and example +--- +## Constructor: documentAttributeVideo\_66 +[Back to constructors index](index.md) + + + +### Attributes: + +| Name | Type | Required | +|----------|:-------------:|---------:| +|round\_message|[Bool](../types/Bool.md) | Optional| +|duration|[int](../types/int.md) | Yes| +|w|[int](../types/int.md) | Yes| +|h|[int](../types/int.md) | Yes| + + + +### Type: [DocumentAttribute](../types/DocumentAttribute.md) + + +### Example: + +``` +$documentAttributeVideo_66 = ['_' => 'documentAttributeVideo', 'round_message' => Bool, 'duration' => int, 'w' => int, 'h' => int, ]; +``` + +Or, if you're into Lua: + + +``` +documentAttributeVideo_66={_='documentAttributeVideo', round_message=Bool, duration=int, w=int, h=int, } + +``` + + diff --git a/docs/index.md b/docs/index.md index 51aa07de4..5cf0789df 100644 --- a/docs/index.md +++ b/docs/index.md @@ -364,6 +364,15 @@ Works exactly like the [socket_send](http://php.net/manual/en/function.socket-se Works exactly like the [socket_close](http://php.net/manual/en/function.socket-close.php) function. +```public function getPeerName(bool $port = true);``` + +Works like [socket_getpeername](http://php.net/manual/en/function.socket-getpeername.php): the difference is that it returns an array with the `host` and the `port`. + + +```public function getSockName(bool $port = true);``` + +Works like [socket_getsockname](http://php.net/manual/en/function.socket-getsockname.php): the difference is that it returns an array with the `host` and the `port`. + ### Uploading and downloading files