PHP Class QueryPath\Entities

Afficher le fichier Open project: microweber/microweber Class Usage Examples

Protected Properties

Свойство Type Description
$regex protected static $regex = '/&([\w]+);|&#([\d]+);|&([\w]*[\s$]+)/m';

Méthodes publiques

Méthode Description
replaceAllEntities ( string $string ) : string Replace all entities.
replaceEntity ( string $entity ) : integer Lookup an entity string's numeric equivalent.

Méthodes protégées

Méthode Description
doReplacement ( array $matches ) Callback for processing replacements.

Method Details

doReplacement() protected static méthode

Callback for processing replacements.
protected static doReplacement ( array $matches )
$matches array The regular expression replacement array.

replaceAllEntities() public static méthode

This will scan a string and will attempt to replace all entities with their numeric equivalent. This will not work with specialized entities.
public static replaceAllEntities ( string $string ) : string
$string string The string to perform replacements on.
Résultat string Returns a string that is similar to the original one, but with all entity replacements made.

replaceEntity() public static méthode

Lookup an entity string's numeric equivalent.
Author: Matt Butcher
Author: Ryan Mahoney
public static replaceEntity ( string $entity ) : integer
$entity string The entity whose numeric value is needed.
Résultat integer The integer value corresponding to the entity.

Property Details

$regex protected_oe static_oe property

protected static $regex = '/&([\w]+);|&#([\d]+);|&([\w]*[\s$]+)/m';
protected static $regex