Documentation

Typograph_Controller
in package

Typograph.

Tags
subpackage

Typograph

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$instance  : mixed
The singleton instances.
$_left_span  : mixed
Left span
$_right_span  : mixed
Right span

Methods

eraseOpticalAlignment()  : string
Метод для удаления тегов предыдущего оптического выравнивания
getConfig()  : array<string|int, mixed>
Get config
instance()  : object
Register an existing instance as a singleton.
process()  : string
Execute the typograph
_applyTextRules()  : string
Apply rules for text
_germanQuotesCallback()  : string
German quotes callback
_herringboneQuotesCallback()  : string
Herringbone quotes callback
_quotesBracketsCallback()  : string
Quotes brackets callback
_quotesSquareBracketsCallback()  : string
Quotes square brackets callback
_quotesTagCallback()  : string
Quotes tag callback
_trailingPunctuationBrackets()  : string
Trailing punctuation brackets
_trailingPunctuationFrenchQuotes()  : string
Trailing punctuation french quotes

Properties

$instance

The singleton instances.

public static mixed $instance = \NULL

$_left_span

Left span

protected mixed $_left_span = \NULL

$_right_span

Right span

protected mixed $_right_span = \NULL

Methods

eraseOpticalAlignment()

Метод для удаления тегов предыдущего оптического выравнивания

public eraseOpticalAlignment(string $str) : string
Parameters
$str : string

исходная строка

«Типограф» — удобный инструмент для автоматического типографирования в соответствии с правилами, принятыми для экранной типографики. Может применяться как для обычного текста, так и HTML-кода.'; echo Typograph_Controller::instance()->eraseOpticalAlignment($str); ?>
Return values
string

строка с вырезанными тегами отического выравнивания

getConfig()

Get config

public getConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>

instance()

Register an existing instance as a singleton.

public static instance() : object
Return values
object

process()

Execute the typograph

public process(string $str[, bool $bTrailingPunctuation = FALSE ]) : string
Parameters
$str : string

source text

$bTrailingPunctuation : bool = FALSE

use trailing punctuation

Return values
string

_applyTextRules()

Apply rules for text

protected _applyTextRules(string $str) : string
Parameters
$str : string
Return values
string

_germanQuotesCallback()

German quotes callback

protected _germanQuotesCallback(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>
Return values
string

_herringboneQuotesCallback()

Herringbone quotes callback

protected _herringboneQuotesCallback(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>
Return values
string

_quotesBracketsCallback()

Quotes brackets callback

protected _quotesBracketsCallback(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>
Return values
string

_quotesSquareBracketsCallback()

Quotes square brackets callback

protected _quotesSquareBracketsCallback(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>
Return values
string

_quotesTagCallback()

Quotes tag callback

protected _quotesTagCallback(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>
Return values
string

_trailingPunctuationBrackets()

Trailing punctuation brackets

protected _trailingPunctuationBrackets(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>
Return values
string

_trailingPunctuationFrenchQuotes()

Trailing punctuation french quotes

protected _trailingPunctuationFrenchQuotes(array<string|int, mixed> $matches) : string
Parameters
$matches : array<string|int, mixed>
Return values
string

        
On this page

Search results