Property | Type | Description | |
---|---|---|---|
$regex | protected static $regex = '/&([\w]+);|&#([\d]+);|&([\w]*[\s$]+)/m'; |
Method | Description | |
---|---|---|
replaceAllEntities ( string $string ) : string | Replace all entities. | |
replaceEntity ( string $entity ) : integer | Lookup an entity string's numeric equivalent. |
Method | Description | |
---|---|---|
doReplacement ( array $matches ) | Callback for processing replacements. |
protected static doReplacement ( array $matches ) | ||
$matches | array | The regular expression replacement array. |
public static replaceAllEntities ( string $string ) : string | ||
$string | string | The string to perform replacements on. |
return | string | Returns a string that is similar to the original one, but with all entity replacements made. |
public static replaceEntity ( string $entity ) : integer | ||
$entity | string | The entity whose numeric value is needed. |
return | integer | The integer value corresponding to the entity. |