PHP 클래스 pQuery\HtmlFormatter

Used like: format($root); ?>
파일 보기 프로젝트 열기: tburry/pquery 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$block_elements Determines which elements start on a new line and which function as block
$errors array Errors found during formatting
$indent_string string String that is used to generate correct indenting
$linebreak_string string String that is used to break lines
$options array Other formatting options
$whitespace Determines which characters are considered whitespace

공개 메소드들

메소드 설명
__construct ( array $options = [] ) Class constructor
__invoke ( &$node ) Class magic invoke method, performs {@link format()}
format ( &$node ) Formats HTML/Javascript
format_html ( DomNode &$root, boolean $recursive = null ) Formats HTML
minify_html ( DomNode &$root, boolean $strip_comments = true, boolean $recursive = true ) Minifies HTML / removes unneeded whitespace
minify_javascript ( DomNode &$root, string $indent_string = ' ', boolean $wrap_comment = true, boolean $recursive = true ) : boolean | array Minifies javascript using JSMin+

메소드 상세

__construct() 공개 메소드

Class constructor
public __construct ( array $options = [] )
$options array {@link $options}

__invoke() 공개 메소드

Class magic invoke method, performs {@link format()}
public __invoke ( &$node )

format() 공개 메소드

Formats HTML/Javascript
또한 보기: format_html()
public format ( &$node )

format_html() 공개 메소드

Formats HTML
public format_html ( DomNode &$root, boolean $recursive = null )
$root DomNode
$recursive boolean

minify_html() 정적인 공개 메소드

Minifies HTML / removes unneeded whitespace
static public minify_html ( DomNode &$root, boolean $strip_comments = true, boolean $recursive = true )
$root DomNode
$strip_comments boolean
$recursive boolean

minify_javascript() 정적인 공개 메소드

Minifies javascript using JSMin+
static public minify_javascript ( DomNode &$root, string $indent_string = ' ', boolean $wrap_comment = true, boolean $recursive = true ) : boolean | array
$root DomNode
$indent_string string
$wrap_comment boolean Wrap javascript in HTML comments ()
$recursive boolean
리턴 boolean | array Array of errors on failure, true on succes

프로퍼티 상세

$block_elements 공개적으로 프로퍼티

Determines which elements start on a new line and which function as block
public $block_elements

$errors 공개적으로 프로퍼티

Errors found during formatting
public array $errors
리턴 array

$indent_string 공개적으로 프로퍼티

String that is used to generate correct indenting
public string $indent_string
리턴 string

$linebreak_string 공개적으로 프로퍼티

String that is used to break lines
public string $linebreak_string
리턴 string

$options 공개적으로 프로퍼티

Other formatting options
public array $options
리턴 array

$whitespace 공개적으로 프로퍼티

Determines which characters are considered whitespace
public $whitespace