\QueryPathEntities

Perform various tasks on HTML/XML entities.

Summary

Methods
Properties
Constants
replaceAllEntities()
replaceEntity()
No public properties found
No constants found
doReplacement()
$regex
N/A
No private methods found
$entity_array
N/A

Properties

$regex

$regex : 

Type

$entity_array

$entity_array : 

Conversion mapper for entities in HTML.

Large entity conversion table. This is significantly broader in range than get_html_translation_table(HTML_ENTITIES).

This code comes from Rhizome (http://code.google.com/p/sinciput)

Type

Methods

replaceAllEntities()

replaceAllEntities(string  $string) : string

Replace all entities.

This will scan a string and will attempt to replace all entities with their numeric equivalent. This will not work with specialized entities.

Parameters

string $string

The string to perform replacements on.

Returns

string —

Returns a string that is similar to the original one, but with all entity replacements made.

replaceEntity()

replaceEntity(string  $entity) : integer

Lookup an entity string's numeric equivalent.

Parameters

string $entity

The entity whose numeric value is needed.

Returns

integer —

The integer value corresponding to the entity.

doReplacement()

doReplacement(array  $matches) 

Callback for processing replacements.

Parameters

array $matches

The regular expression replacement array.