Elgg  Version 1.11
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ElggAutoP Class Reference

Public Member Functions

 __construct ()
 Constructor. More...
 
 process ($html)
 Create wrapper P and BR elements in HTML depending on newlines. More...
 

Public Attributes

 $encoding = 'UTF-8'
 

Protected Member Functions

 addParagraphs (DOMElement $el)
 Add P and BR elements as necessary. More...
 

Protected Attributes

 $_doc = null
 
 $_xpath = null
 
 $_blocks
 
 $_inlines
 
 $_descendList
 
 $_alterList
 
 $_unique = ''
 

Detailed Description

Definition at line 14 of file ElggAutoP.php.

Constructor & Destructor Documentation

ElggAutoP::__construct ( )

Constructor.

Definition at line 63 of file ElggAutoP.php.

Member Function Documentation

ElggAutoP::addParagraphs ( DOMElement  $el)
protected

Add P and BR elements as necessary.

Parameters
DOMElement$elDOM element
Returns
void

Definition at line 196 of file ElggAutoP.php.

ElggAutoP::process (   $html)

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.

In DIV, LI, TD, and TH elements, Ps are only added when their would be at least two of them.

Parameters
string$htmlsnippet
Returns
string|false output or false if parse error occurred

Definition at line 82 of file ElggAutoP.php.

Member Data Documentation

ElggAutoP::$_alterList
protected
Initial value:
= 'article aside blockquote body details div footer header
section'

Definition at line 54 of file ElggAutoP.php.

ElggAutoP::$_blocks
protected
Initial value:
= 'address article area aside blockquote caption col colgroup dd
details div dl dt fieldset figure figcaption footer form h1 h2 h3 h4 h5 h6 header
hr hgroup legend map math menu nav noscript p pre section select style summary
table tbody td tfoot th thead tr ul ol option li'

Definition at line 28 of file ElggAutoP.php.

ElggAutoP::$_descendList
protected
Initial value:
= 'article aside blockquote body details div footer form
header section'

Definition at line 46 of file ElggAutoP.php.

ElggAutoP::$_doc = null
protected

Definition at line 21 of file ElggAutoP.php.

ElggAutoP::$_inlines
protected
Initial value:
= 'a abbr audio b button canvas caption cite code command datalist
del dfn em embed i iframe img input ins kbd keygen label map mark meter object
output progress q rp rt ruby s samp script select small source span strong style
sub sup textarea time var video wbr'

Definition at line 36 of file ElggAutoP.php.

ElggAutoP::$_unique = ''
protected

Definition at line 58 of file ElggAutoP.php.

ElggAutoP::$_xpath = null
protected

Definition at line 26 of file ElggAutoP.php.

ElggAutoP::$encoding = 'UTF-8'

Definition at line 16 of file ElggAutoP.php.


The documentation for this class was generated from the following file: