PHP 클래스 JoliTypo\Fixer

파일 보기 프로젝트 열기: jolicode/jolitypo 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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