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));
 }