PHP Class ElggAutoP, Elgg

In DIV elements, Ps are only added when there would be at least two of them.
Afficher le fichier Open project: elgg/elgg Class Usage Examples

Méthodes publiques

Свойство Type Description
$encoding

Protected Properties

Свойство Type Description
$_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

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
addParagraphs ( DOMElement $el ) : void Add P and BR elements as necessary

Method Details

__construct() public méthode

Constructor
public __construct ( )

addParagraphs() protected méthode

Add P and BR elements as necessary
protected addParagraphs ( DOMElement $el ) : void
$el DOMElement DOM element
Résultat void

process() public méthode

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
Résultat string | false output or false if parse error occurred

Property Details

$_alterList protected_oe property

Add Ps inside these elements
protected array $_alterList
Résultat array

$_blocks protected_oe property

protected $_blocks

$_descendList protected_oe property

Descend into these elements to add Ps
protected array $_descendList
Résultat array

$_doc protected_oe property

protected DOMDocument $_doc
Résultat DOMDocument

$_inlines protected_oe property

protected array $_inlines
Résultat array

$_unique protected_oe property

protected string $_unique
Résultat string

$_xpath protected_oe property

protected DOMXPath $_xpath
Résultat DOMXPath

$encoding public_oe property

public $encoding