Link Search Menu Expand Document

danog\MadelineProto\TL\Conversion\Entities

Back to index

Author: Daniil Gentili daniil@daniil.it
Author: Mahdi mahdi.talaee1379@gmail.com

Entities module.

This file is part of MadelineProto. MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU General Public License along with MadelineProto. If not, see http://www.gnu.org/licenses/.

Method list:

  • entitiesToHtml(string $text, array|object $entities, bool $specialchars): string
  • entitiesToMarkdownV1(string $text, object|array $entities, bool $slashmarkdown): string
  • entitiesToMarkdown(string $text, object|array $entities, bool $slashmarkdown): string
  • markdownV1ToHtml()
  • markdownToHtml()
  • htmlToEntities()
  • markdownToEntities()
  • markdownV1ToEntities()
  • markdownhtmlToEntities()
  • markdownV1htmlToEntities()
  • htmlToMarkdown()
  • htmlToMarkdownv1()
  • parseText(\non-empty-string $text): \danog\MadelineProto\TL\Conversion\DOMEntities

Methods:

entitiesToHtml(string $text, array|object $entities, bool $specialchars): string

entitiesToHtml Covert entities to html tags.

Parameters:

  • $text: string
  • $entities: array|object
  • $specialchars: bool

entitiesToMarkdownV1(string $text, object|array $entities, bool $slashmarkdown): string

entitiesToMarkdownV1 Covert entities to html tags v1 (Telegram version).

Parameters:

  • $text: string
  • $entities: object|array
  • $slashmarkdown: bool

entitiesToMarkdown(string $text, object|array $entities, bool $slashmarkdown): string

entitiesToMarkdown convert given entities to markdown.

Parameters:

  • $text: string
  • $entities: object|array
  • $slashmarkdown: bool

markdownV1ToHtml()

markdownV1ToHtml convert markdownv1 to html.

markdownToHtml()

markdownToHtml convert html tags to markdown format.

htmlToEntities()

htmlToEntities convert html tags to entities.

markdownToEntities()

markdownToEntities convert markdown format to entities.

markdownV1ToEntities()

markdownV1ToEntities convert markdownV1 to entities.

markdownhtmlToEntities()

markdownhtmlToEntities convert mixed format(with markdown and html) to entities.

markdownV1htmlToEntities()

markdownV1htmlToEntities convert mixed format(with markdownv1 and html) to entities.

htmlToMarkdown()

htmlToMarkdown convert html tags to markdown format.

htmlToMarkdownv1()

htmlToMarkdownv1 convert html tags to markdownv1 format.

parseText(\non-empty-string $text): \danog\MadelineProto\TL\Conversion\DOMEntities

parseText (main function) function return formated text with entities or tags or format it to markdown & markdownv1.

Parameters:

  • $text: \non-empty-string

See also:

  • \danog\MadelineProto\TL\Conversion\DOMEntities

Generated by danog/phpdoc