PHP Класс JoliTypo\Fixer

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_rules
$locale The default locale (used by some Fixer)
$protectedTags HTML Tags to bypass
$stateBag StateBag

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

Метод Описание
__construct ( array $rules )
fix ( string $content ) : string
fixString ( string $content ) : string
getLanguageFromLocale ( $locale ) : string Get language part of a Locale string (fr_FR => fr).
getLocale ( ) : string Get the current Locale tag.
setLocale ( string $locale ) Change the locale of the Fixer.
setProtectedTags ( array $protectedTags ) Customize the list of protected tags.
setRules ( array $rules ) Change the list of rules for a given locale.

Приватные методы

Метод Описание
compileRules ( $rules ) Build the _rules array of Fixer.
doFix ( DOMText $childNode, DOMNode $node, DOMDocument $dom ) Run the Fixers on a DOMText content.
exportDOMDocument ( DOMDocument $dom ) : string
fixContentEncoding ( $content ) : string Convert the content encoding properly and add Content-Type meta if HTML document.
loadDOMDocument ( $content ) : DOMDocument
processDOM ( DOMNode $node, DOMDocument $dom ) Loop over all the DOMNode recursively.

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

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

public __construct ( array $rules )
$rules array Array of Fixer

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

public fix ( string $content ) : string
$content string HTML content to fix
Результат string Fixed content

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

public fixString ( string $content ) : string
$content string Basic content to fix
Результат string

getLanguageFromLocale() публичный статический Метод

Get language part of a Locale string (fr_FR => fr).
public static getLanguageFromLocale ( $locale ) : string
$locale
Результат string

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

Get the current Locale tag.
public getLocale ( ) : string
Результат string

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

Change the locale of the Fixer.
public setLocale ( string $locale )
$locale string An IETF language tag

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

Customize the list of protected tags.
public setProtectedTags ( array $protectedTags )
$protectedTags array

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

Change the list of rules for a given locale.
public setRules ( array $rules )
$rules array Array of Fixer

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

$_rules защищенное свойство

protected $_rules

$locale защищенное свойство

The default locale (used by some Fixer)
protected $locale

$protectedTags защищенное свойство

HTML Tags to bypass
protected $protectedTags

$stateBag защищенное свойство

protected StateBag,jolitypo $stateBag
Результат StateBag