PHP Класс CI_Typography, TastyIgniter

Автор: ExpressionEngine Dev Team
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$block_elements string Block level elements that should not be wrapped inside

tags

$inline_elements string Tags we want the parser to completely ignore when splitting the string.
$inner_block_required array array of block level elements that require inner content to be within another block level element
$last_block_element string the last block element parsed
$protect_braced_quotes boolean whether or not to protect quotes within { curly braces }
$skip_elements string Elements that should not have

and
tags within them.

Открытые методы

Метод Описание
auto_typography ( $str, $reduce_linebreaks = FALSE ) : string Auto Typography
format_characters ( $str ) : string Format Characters
nl2br_except_pre ( $str ) : string Convert newlines to HTML line breaks except within PRE tags

Защищенные методы

Метод Описание
_format_newlines ( $str ) : string Format Newlines
_protect_characters ( $match ) : string Protect Characters

Описание методов

_format_newlines() защищенный Метод

Converts newline characters into either

tags or

protected _format_newlines ( $str ) : string
Результат string

_protect_characters() защищенный Метод

Protects special characters from being formatted later We don't want quotes converted within tags so we'll temporarily convert them to {@DQ} and {@SQ} and we don't want double dashes converted to emdash entities, so they are marked with {@DD} likewise double spaces are converted to {@NBS} to prevent entity conversion
protected _protect_characters ( $match ) : string
Результат string

auto_typography() публичный Метод

This function converts text, making it typographically correct: - Converts double spaces into paragraphs. - Converts single line breaks into
tags - Converts single and double quotes into correctly facing curly quote entities. - Converts three dots into ellipsis. - Converts double dashes into em-dashes. - Converts two spaces into entities
public auto_typography ( $str, $reduce_linebreaks = FALSE ) : string
Результат string

format_characters() публичный Метод

This function mainly converts double and single quotes to curly entities, but it also converts em-dashes, double spaces, and ampersands
public format_characters ( $str ) : string
Результат string

nl2br_except_pre() публичный Метод

Convert newlines to HTML line breaks except within PRE tags
public nl2br_except_pre ( $str ) : string
Результат string

Описание свойств

$block_elements публичное свойство

Block level elements that should not be wrapped inside

tags

public string $block_elements
Результат string

$inline_elements публичное свойство

Tags we want the parser to completely ignore when splitting the string.
public string $inline_elements
Результат string

$inner_block_required публичное свойство

array of block level elements that require inner content to be within another block level element
public array $inner_block_required
Результат array

$last_block_element публичное свойство

the last block element parsed
public string $last_block_element
Результат string

$protect_braced_quotes публичное свойство

whether or not to protect quotes within { curly braces }
public bool $protect_braced_quotes
Результат boolean

$skip_elements публичное свойство

Elements that should not have

and
tags within them.

public string $skip_elements
Результат string