Longman\TelegramBot\Entities\Keyboard::parseRow PHP Method

parseRow() protected method

Parse a given row to the correct array format.
protected parseRow ( array $row ) : array
$row array
return array
    protected function parseRow($row)
    {
        if (!is_array($row)) {
            return null;
        }
        $new_row = [];
        foreach ($row as $button) {
            if (($new_button = $this->parseButton($button)) !== null) {
                $new_row[] = $new_button;
            }
        }
        return $new_row;
    }