QueryPath\Entities::replaceEntity PHP Метод

replaceEntity() публичный статический Метод

Lookup an entity string's numeric equivalent.
Автор: Matt Butcher
Автор: Ryan Mahoney
public static replaceEntity ( string $entity ) : integer
$entity string The entity whose numeric value is needed.
Результат integer The integer value corresponding to the entity.
    public static function replaceEntity($entity)
    {
        return self::$entity_array[$entity];
    }

Usage Example

 public function testReplaceEntity()
 {
     $entity = 'amp';
     $this->assertEquals('38', \QueryPath\Entities::replaceEntity($entity));
     $entity = 'lceil';
     $this->assertEquals('8968', \QueryPath\Entities::replaceEntity($entity));
 }