Overview

Packages

  • ClipIt
    • clipit
      • api
    • urjc
      • backend
  • Elgg
    • Core
      • Access
      • Authentication
      • Cache
      • Caches
      • Core
      • DataMode
        • Site
      • DataModel
        • Annotations
        • Entities
        • Extender
        • File
        • Importable
        • Loggable
        • Notable
        • Object
        • User
      • DataStorage
      • Exception
      • Exceptions
        • Stub
      • FileStore
        • Disk
      • Groups
      • Helpers
      • HMAC
      • Memcache
      • Metadata
      • Navigation
      • ODD
      • Output
      • Plugins
        • Settings
      • Sessions
      • SocialModel
        • Friendable
        • Locatable
      • WebServicesAPI
      • Widgets
      • XML
      • XMLRPC
    • Exceptions
      • Stub
  • None
  • PHP

Classes

  • ElggAutoP
  • Overview
  • Package
  • Class
  • Tree

Class ElggAutoP

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 elements, Ps are only added when there would be at least two of them.

Package: Elgg\Core\Output
Located at ElggAutoP.php
Methods summary
public
# __construct( )

Constructor

Constructor

public static ElggAutoP
# getInstance( )

Singleton pattern.

Singleton pattern.

Returns

ElggAutoP
public string|false
# process( string $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.

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

$html
string
$html snippet

Returns

string|false
output or false if parse error occurred
protected
# addParagraphs( DOMElement $el )

Add P and BR elements as necessary

Add P and BR elements as necessary

Parameters

$el
DOMElement
$el DOM element
Properties summary
public string $encoding 'UTF-8'
#
protected DOMDocument $_doc null
#
protected DOMXPath $_xpath null
#
protected string $_blocks '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'
#
protected array $_inlines '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'
#
protected array $_descendList 'article aside blockquote body details div footer form header section'
#

Descend into these elements to add Ps

Descend into these elements to add Ps

protected array $_alterList 'article aside blockquote body details div footer header section'
#

Add Ps inside these elements

Add Ps inside these elements

protected string $_unique ''
#
API documentation generated by ApiGen 2.8.0