PHP 클래스 ElggAutoP, Elgg

In DIV elements, Ps are only added when there would be at least two of them.
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$encoding

보호된 프로퍼티들

프로퍼티 타입 설명
$_alterList array Add Ps inside these elements
$_blocks
$_descendList array Descend into these elements to add Ps
$_doc DOMDocument
$_inlines array
$_unique string
$_xpath DOMXPath

공개 메소드들

메소드 설명
__construct ( ) Constructor
process ( string $html ) : string | false Create wrapper P and BR elements in HTML depending on newlines. Useful when users use newlines to signal line and paragraph breaks. In all cases output should be well-formed markup.

보호된 메소드들

메소드 설명
addParagraphs ( DOMElement $el ) : void Add P and BR elements as necessary

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( )

addParagraphs() 보호된 메소드

Add P and BR elements as necessary
protected addParagraphs ( DOMElement $el ) : void
$el DOMElement DOM element
리턴 void

process() 공개 메소드

In DIV, LI, TD, and TH elements, Ps are only added when their would be at least two of them.
public process ( string $html ) : string | false
$html string snippet
리턴 string | false output or false if parse error occurred

프로퍼티 상세

$_alterList 보호되어 있는 프로퍼티

Add Ps inside these elements
protected array $_alterList
리턴 array

$_blocks 보호되어 있는 프로퍼티

protected $_blocks

$_descendList 보호되어 있는 프로퍼티

Descend into these elements to add Ps
protected array $_descendList
리턴 array

$_doc 보호되어 있는 프로퍼티

protected DOMDocument $_doc
리턴 DOMDocument

$_inlines 보호되어 있는 프로퍼티

protected array $_inlines
리턴 array

$_unique 보호되어 있는 프로퍼티

protected string $_unique
리턴 string

$_xpath 보호되어 있는 프로퍼티

protected DOMXPath $_xpath
리턴 DOMXPath

$encoding 공개적으로 프로퍼티

public $encoding