Lines Matching refs:entity
27 public static function decode(string $entity): string
29 if (\substr($entity, -1) !== ';') {
30 return $entity;
33 if (\substr($entity, 0, 2) === '&#') {
34 if (\strtolower(\substr($entity, 2, 1)) === 'x') {
35 return self::fromHex(\substr($entity, 3, -1));
38 return self::fromDecimal(\substr($entity, 2, -1));
41 return \html_entity_decode($entity, \ENT_QUOTES | \ENT_HTML5, 'UTF-8');
57 $entity = '&#' . $number . ';';
59 $converted = \mb_decode_numericentity($entity, [0x0, 0x2FFFF, 0, 0xFFFF], 'UTF-8');
61 if ($converted === $entity) {