Improvement to TL parameter regex
This commit is contained in:
parent
c638ad10ac
commit
d23083bd5a
@ -939,13 +939,13 @@ description: List of constructors
|
||||
<br><br>[$replyMarkupForceReply](../constructors/replyMarkupForceReply.md) = \['personal' => [Bool](../types/Bool.md), \];<a name="replyMarkupForceReply"></a>
|
||||
|
||||
***
|
||||
<br><br>[$replyMarkupInlineKeyboard](../constructors/replyMarkupInlineKeyboard.md) = \['rows' => \[[inlineKeyboardButton](../constructors/inlineKeyboardButton.md)\], \];<a name="replyMarkupInlineKeyboard"></a>
|
||||
<br><br>[$replyMarkupInlineKeyboard](../constructors/replyMarkupInlineKeyboard.md) = \['rows' => \[[vector<inlineKeyboardButton](../constructors/vector<inlineKeyboardButton.md)\], \];<a name="replyMarkupInlineKeyboard"></a>
|
||||
|
||||
***
|
||||
<br><br>[$replyMarkupRemoveKeyboard](../constructors/replyMarkupRemoveKeyboard.md) = \['personal' => [Bool](../types/Bool.md), \];<a name="replyMarkupRemoveKeyboard"></a>
|
||||
|
||||
***
|
||||
<br><br>[$replyMarkupShowKeyboard](../constructors/replyMarkupShowKeyboard.md) = \['rows' => \[[keyboardButton](../constructors/keyboardButton.md)\], 'resize_keyboard' => [Bool](../types/Bool.md), 'one_time' => [Bool](../types/Bool.md), 'personal' => [Bool](../types/Bool.md), \];<a name="replyMarkupShowKeyboard"></a>
|
||||
<br><br>[$replyMarkupShowKeyboard](../constructors/replyMarkupShowKeyboard.md) = \['rows' => \[[vector<keyboardButton](../constructors/vector<keyboardButton.md)\], 'resize_keyboard' => [Bool](../types/Bool.md), 'one_time' => [Bool](../types/Bool.md), 'personal' => [Bool](../types/Bool.md), \];<a name="replyMarkupShowKeyboard"></a>
|
||||
|
||||
***
|
||||
<br><br>[$richTextBold](../constructors/richTextBold.md) = \['text' => [RichText](../types/RichText.md), \];<a name="richTextBold"></a>
|
||||
|
@ -13,7 +13,7 @@ Contains inline keyboard layout
|
||||
|
||||
| Name | Type | Required | Description |
|
||||
|----------|---------------|----------|-------------|
|
||||
|rows|Array of [inlineKeyboardButton](../constructors/inlineKeyboardButton.md) | Yes|List of rows of inline keyboard buttons|
|
||||
|rows|Array of [vector<inlineKeyboardButton](../constructors/vector<inlineKeyboardButton.md) | Yes|List of rows of inline keyboard buttons|
|
||||
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ Contains custom keyboard layout for fast reply to bot
|
||||
|
||||
| Name | Type | Required | Description |
|
||||
|----------|---------------|----------|-------------|
|
||||
|rows|Array of [keyboardButton](../constructors/keyboardButton.md) | Yes|List of rows of bot keyboard buttons|
|
||||
|rows|Array of [vector<keyboardButton](../constructors/vector<keyboardButton.md) | Yes|List of rows of bot keyboard buttons|
|
||||
|resize\_keyboard|[Bool](../types/Bool.md) | Yes|Do clients need to resize keyboard vertically|
|
||||
|one\_time|[Bool](../types/Bool.md) | Yes|Do clients need to hide keyboard after use|
|
||||
|personal|[Bool](../types/Bool.md) | Yes|Keyboard is showed automatically only for mentioned users or replied to user, for incoming messages it is true if and only if keyboard needs to be automatically showed to current user|
|
||||
|
@ -22,7 +22,7 @@ trait TLParams
|
||||
$param['pow'] = pow(2, $matches[1]);
|
||||
$param['type'] = $matches[2];
|
||||
}
|
||||
if (preg_match('/(v)ector<(.*)>/i', $param['type'], $matches)) {
|
||||
if (preg_match('/^(v|V)ector\<(.*)\>$/', $param['type'], $matches)) {
|
||||
$param['type'] = $matches[1] === 'v' ? 'vector': 'Vector t';
|
||||
$param['subtype'] = $matches[2];
|
||||
$param['subtype'] = ($mtproto && $param['subtype'] === 'Message' ? 'MT' : '').$param['subtype'];
|
||||
|
Loading…
Reference in New Issue
Block a user