Documentation

CharacterReference
in package

Manage entity references.

This is a simple resolver for HTML5 character reference entitites. See Entities for the list of supported entities.

Table of Contents

Properties

$numeric_mask  : mixed

Methods

lookupDecimal()  : false|string|array<string|int, string>|null
Given a decimal number, return the UTF-8 character.
lookupHex()  : false|string|array<string|int, string>|null
Given a hexadecimal number, return the UTF-8 character.
lookupName()  : string
Given a name (e.g. 'amp'), lookup the UTF-8 character ('&').

Properties

$numeric_mask

protected static mixed $numeric_mask = array(0x0, 0x2ffff, 0, 0xffff)

Methods

lookupDecimal()

Given a decimal number, return the UTF-8 character.

public static lookupDecimal(mixed $int) : false|string|array<string|int, string>|null
Parameters
$int : mixed
Return values
false|string|array<string|int, string>|null

lookupHex()

Given a hexadecimal number, return the UTF-8 character.

public static lookupHex(mixed $hexdec) : false|string|array<string|int, string>|null
Parameters
$hexdec : mixed
Return values
false|string|array<string|int, string>|null

lookupName()

Given a name (e.g. 'amp'), lookup the UTF-8 character ('&').

public static lookupName(string $name) : string
Parameters
$name : string

The name to look up.

Return values
string

The character sequence. In UTF-8 this may be more than one byte.


        
On this page

Search results