Antidot PHP API  version 0.16.0
##PHP API to simplify integration of Antidot components
 All Classes Files Functions Variables Groups Pages
Public Member Functions | List of all members
FilterNode Class Reference

Filter node and retrieve node text contents. More...

Inheritance diagram for FilterNode:
BoldFilterNode TruncatedFilterNode

Public Member Functions

 __construct ($local_name, $ns_uri=null)
 Construct new instance.
 get_id ()
 Retrieves filter identifier.
 match ($node)
 Checks whether provided node should treated by this filter.
 format_text ($text)
 Format text node content.

Detailed Description

Filter node and retrieve node text contents.

Constructor & Destructor Documentation

__construct (   $local_name,
  $ns_uri = null 
)

Construct new instance.

Parameters
$local_name[in] DOMElement local name.
$ns_uri[in] namespace URI of the DOMElement (default: null).

Reimplemented in TruncatedFilterNode, and BoldFilterNode.

Member Function Documentation

format_text (   $text)

Format text node content.

Default implementation does nothing. You can extends this class and overload this method to do specific formatting.

Parameters
$text[in] text node content.
Returns
text as is.

Reimplemented in TruncatedFilterNode, and BoldFilterNode.

get_id ( )
final

Retrieves filter identifier.

Internal use only.

Returns
instance identifier.
match (   $node)
final

Checks whether provided node should treated by this filter.

Both local name and namespace must match.

Parameters
$node[in] DOMElement to test.
Returns
True when provided node matches this filter, false otherwise.