PHP 클래스 Texy\Texy

$texy = new Texy(); $html = $texy->process($text);
상속: use trait Strict
파일 보기 프로젝트 열기: dg/texy 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$_classes for internal usage
$_styles for internal usage
$alignClasses CSS classes for align modifiers
$allowed Texy! syntax configuration
$allowedClasses Allowed classes
$allowedStyles Allowed inline CSS style
$allowedTags Allowed HTML tags
$blockModule Texy\Modules\BlockModule
$blockQuoteModule Texy\Modules\BlockQuoteModule
$dtd array $dtd[element][0] - allowed attributes (as array keys) $dtd[element][1] - allowed content for an element (content model) (as array keys) - array of allowed elements (as keys) - FALSE - empty element - 0 - special case for ins & del
$emoticonModule Texy\Modules\EmoticonModule
$figureModule Texy\Modules\FigureModule
$headingModule Texy\Modules\HeadingModule
$horizLineModule Texy\Modules\HorizLineModule
$htmlModule Texy\Modules\HtmlModule
$htmlOutputModule Texy\Modules\HtmlOutputModule
$imageModule Texy\Modules\ImageModule
$linkModule Texy\Modules\LinkModule
$listModule Texy\Modules\ListModule
$longWordsModule Texy\Modules\LongWordsModule
$mergeLines Paragraph merging mode
$nontextParagraph string
$obfuscateEmail Do obfuscate e-mail addresses?
$paragraphModule Texy\Modules\ParagraphModule
$phraseModule Texy\Modules\PhraseModule
$removeSoftHyphens remove soft hyphens (SHY)?
$scriptModule Texy\Modules\ScriptModule
$styleSheet Generated stylesheet
$summary Parsing summary
$tabWidth TAB width (for converting tabs to spaces)
$tableModule Texy\Modules\TableModule
$typographyModule Texy\Modules\TypographyModule
$urlSchemeFilters regexps to check URL schemes

공개 메소드들

메소드 설명
__clone ( )
__construct ( )
addHandler ( $event, $callback ) : void Add new event handler.
checkURL ( $URL, $type ) : boolean Filters bad URLs.
escapeHtml ( $s )
freezeSpaces ( $s )
getBlockPatterns ( )
getDOM ( )
getLinePatterns ( )
getOutputMode ( ) : integer Get HTML/XHTML output mode
invokeAroundHandlers ( $event, Parser $parser, array $args ) : mixed Invoke registered around-handlers.
invokeHandlers ( $event, array $args ) : void Invoke registered after-handlers.
isRelative ( $URL )
normalize ( $s )
outdent ( $s )
prependRoot ( $URL, $root )
process ( $text, $singleLine = FALSE ) : string Converts document in Texy! to (X)HTML code.
processLine ( $text ) : string Converts single line in Texy! to (X)HTML code.
processTypo ( $text ) : string Makes only typographic corrections.
protect ( $child, $contentType ) : string Generate unique mark - useful for freezing (folding) some substrings.
registerBlockPattern ( $handler, $pattern, $name )
registerLinePattern ( $handler, $pattern, $name, $againTest = NULL )
registerPostLine ( $handler, $name )
setOutputMode ( $mode ) : void Set HTML/XHTML output mode (overwrites self::$allowedTags)
stringToHtml ( $s ) : string Converts internal string representation to final HTML code.
stringToText ( $s ) : string Converts internal string representation to final HTML code.
toText ( ) : string Converts DOM structure to pure text.
unProtect ( $html )
unescapeHtml ( $s )
unfreezeSpaces ( $s )
webalize ( $s, $charlist = NULL )

보호된 메소드들

메소드 설명
loadModules ( ) Create array of all used modules ($this->modules).

메소드 상세

__clone() 최종 공개 메소드

final public __clone ( )

__construct() 공개 메소드

public __construct ( )

addHandler() 최종 공개 메소드

Add new event handler.
final public addHandler ( $event, $callback ) : void
리턴 void

checkURL() 최종 공개 메소드

Filters bad URLs.
final public checkURL ( $URL, $type ) : boolean
리턴 boolean

escapeHtml() 최종 공개 정적인 메소드

사용 중단:
final public static escapeHtml ( $s )

freezeSpaces() 최종 공개 정적인 메소드

사용 중단:
final public static freezeSpaces ( $s )

getBlockPatterns() 최종 공개 메소드

final public getBlockPatterns ( )

getDOM() 최종 공개 메소드

final public getDOM ( )

getLinePatterns() 최종 공개 메소드

final public getLinePatterns ( )

getOutputMode() 공개 메소드

Get HTML/XHTML output mode
public getOutputMode ( ) : integer
리턴 integer

invokeAroundHandlers() 최종 공개 메소드

Invoke registered around-handlers.
final public invokeAroundHandlers ( $event, Parser $parser, array $args ) : mixed
$parser Parser
$args array
리턴 mixed

invokeHandlers() 최종 공개 메소드

Invoke registered after-handlers.
final public invokeHandlers ( $event, array $args ) : void
$args array
리턴 void

isRelative() 최종 공개 정적인 메소드

사용 중단:
final public static isRelative ( $URL )

loadModules() 보호된 메소드

This array can be changed by overriding this method (by subclasses)
protected loadModules ( )

normalize() 최종 공개 정적인 메소드

사용 중단:
final public static normalize ( $s )

outdent() 최종 공개 정적인 메소드

사용 중단:
final public static outdent ( $s )

prependRoot() 최종 공개 정적인 메소드

사용 중단:
final public static prependRoot ( $URL, $root )

process() 공개 메소드

Converts document in Texy! to (X)HTML code.
public process ( $text, $singleLine = FALSE ) : string
리턴 string output HTML code

processLine() 공개 메소드

Converts single line in Texy! to (X)HTML code.
public processLine ( $text ) : string
리턴 string output HTML code

processTypo() 공개 메소드

Makes only typographic corrections.
public processTypo ( $text ) : string
리턴 string output text

protect() 최종 공개 메소드

Generate unique mark - useful for freezing (folding) some substrings.
final public protect ( $child, $contentType ) : string
리턴 string internal mark

registerBlockPattern() 최종 공개 메소드

final public registerBlockPattern ( $handler, $pattern, $name )

registerLinePattern() 최종 공개 메소드

final public registerLinePattern ( $handler, $pattern, $name, $againTest = NULL )

registerPostLine() 최종 공개 메소드

final public registerPostLine ( $handler, $name )

setOutputMode() 공개 메소드

Set HTML/XHTML output mode (overwrites self::$allowedTags)
public setOutputMode ( $mode ) : void
리턴 void

stringToHtml() 최종 공개 메소드

Converts internal string representation to final HTML code.
final public stringToHtml ( $s ) : string
리턴 string

stringToText() 최종 공개 메소드

Converts internal string representation to final HTML code.
final public stringToText ( $s ) : string
리턴 string

toText() 공개 메소드

Converts DOM structure to pure text.
public toText ( ) : string
리턴 string

unProtect() 최종 공개 메소드

final public unProtect ( $html )

unescapeHtml() 최종 공개 정적인 메소드

사용 중단:
final public static unescapeHtml ( $s )

unfreezeSpaces() 최종 공개 정적인 메소드

사용 중단:
final public static unfreezeSpaces ( $s )

webalize() 최종 공개 정적인 메소드

사용 중단:
final public static webalize ( $s, $charlist = NULL )

프로퍼티 상세

$_classes 공개적으로 프로퍼티

for internal usage
public $_classes

$_styles 공개적으로 프로퍼티

for internal usage
public $_styles

$alignClasses 공개적으로 프로퍼티

CSS classes for align modifiers
public $alignClasses

$allowed 공개적으로 프로퍼티

Texy! syntax configuration
public $allowed

$allowedClasses 공개적으로 프로퍼티

Allowed classes
public $allowedClasses

$allowedStyles 공개적으로 프로퍼티

Allowed inline CSS style
public $allowedStyles

$allowedTags 공개적으로 프로퍼티

Allowed HTML tags
public $allowedTags

$blockModule 공개적으로 프로퍼티

public BlockModule,Texy\Modules $blockModule
리턴 Texy\Modules\BlockModule

$blockQuoteModule 공개적으로 프로퍼티

public BlockQuoteModule,Texy\Modules $blockQuoteModule
리턴 Texy\Modules\BlockQuoteModule

$dtd 공개적으로 프로퍼티

$dtd[element][0] - allowed attributes (as array keys) $dtd[element][1] - allowed content for an element (content model) (as array keys) - array of allowed elements (as keys) - FALSE - empty element - 0 - special case for ins & del
public array $dtd
리턴 array

$emoticonModule 공개적으로 프로퍼티

public EmoticonModule,Texy\Modules $emoticonModule
리턴 Texy\Modules\EmoticonModule

$figureModule 공개적으로 프로퍼티

public FigureModule,Texy\Modules $figureModule
리턴 Texy\Modules\FigureModule

$headingModule 공개적으로 프로퍼티

public HeadingModule,Texy\Modules $headingModule
리턴 Texy\Modules\HeadingModule

$horizLineModule 공개적으로 프로퍼티

public HorizLineModule,Texy\Modules $horizLineModule
리턴 Texy\Modules\HorizLineModule

$htmlModule 공개적으로 프로퍼티

public HtmlModule,Texy\Modules $htmlModule
리턴 Texy\Modules\HtmlModule

$htmlOutputModule 공개적으로 프로퍼티

public HtmlOutputModule,Texy\Modules $htmlOutputModule
리턴 Texy\Modules\HtmlOutputModule

$imageModule 공개적으로 프로퍼티

public ImageModule,Texy\Modules $imageModule
리턴 Texy\Modules\ImageModule

$linkModule 공개적으로 프로퍼티

public LinkModule,Texy\Modules $linkModule
리턴 Texy\Modules\LinkModule

$listModule 공개적으로 프로퍼티

public ListModule,Texy\Modules $listModule
리턴 Texy\Modules\ListModule

$longWordsModule 공개적으로 프로퍼티

public LongWordsModule,Texy\Modules $longWordsModule
리턴 Texy\Modules\LongWordsModule

$mergeLines 공개적으로 프로퍼티

Paragraph merging mode
public $mergeLines

$nontextParagraph 공개적으로 프로퍼티

public string $nontextParagraph
리턴 string

$obfuscateEmail 공개적으로 프로퍼티

Do obfuscate e-mail addresses?
public $obfuscateEmail

$paragraphModule 공개적으로 프로퍼티

public ParagraphModule,Texy\Modules $paragraphModule
리턴 Texy\Modules\ParagraphModule

$phraseModule 공개적으로 프로퍼티

public PhraseModule,Texy\Modules $phraseModule
리턴 Texy\Modules\PhraseModule

$removeSoftHyphens 공개적으로 프로퍼티

remove soft hyphens (SHY)?
public $removeSoftHyphens

$scriptModule 공개적으로 프로퍼티

public ScriptModule,Texy\Modules $scriptModule
리턴 Texy\Modules\ScriptModule

$styleSheet 공개적으로 프로퍼티

Generated stylesheet
public $styleSheet

$summary 공개적으로 프로퍼티

Parsing summary
public $summary

$tabWidth 공개적으로 프로퍼티

TAB width (for converting tabs to spaces)
public $tabWidth

$tableModule 공개적으로 프로퍼티

public TableModule,Texy\Modules $tableModule
리턴 Texy\Modules\TableModule

$typographyModule 공개적으로 프로퍼티

public TypographyModule,Texy\Modules $typographyModule
리턴 Texy\Modules\TypographyModule

$urlSchemeFilters 공개적으로 프로퍼티

regexps to check URL schemes
public $urlSchemeFilters