PHP 클래스 PHPHtmlParser\Content

파일 보기 프로젝트 열기: paquettg/php-html-parser 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$attr
$blank string The following 4 strings are tags that are important to us.
$content string The content string.
$equal
$pos integer The current position we are in the content.
$size integer The size of the content.
$slash

공개 메소드들

메소드 설명
__construct ( $content ) Content constructor.
char ( integer $char = null ) : string Gets the current character we are at.
copyByToken ( string $token, boolean $char = false, boolean $escape = false ) : string Copies the content until it reaches the token string.,
copyUntil ( string $string, boolean $char = false, boolean $escape = false ) : string Copy the content until we find the given string.
copyUntilUnless ( string $string, string $unless ) : string Copies the content until the string is found and return it unless the 'unless' is found in the substring.
fastForward ( integer $count ) Moves the current position forward.
getPosition ( ) : integer Returns the current position of the content.
rewind ( integer $count ) Moves the current position backward.
skip ( string $string, boolean $copy = false ) Skip a given set of characters.
skipByToken ( string $token, boolean $copy = false ) : null | string Skip a given token of pre-defined characters.

메소드 상세

__construct() 공개 메소드

Content constructor.
public __construct ( $content )
$content

char() 공개 메소드

Gets the current character we are at.
public char ( integer $char = null ) : string
$char integer
리턴 string

copyByToken() 공개 메소드

Copies the content until it reaches the token string.,
public copyByToken ( string $token, boolean $char = false, boolean $escape = false ) : string
$token string
$char boolean
$escape boolean
리턴 string

copyUntil() 공개 메소드

Copy the content until we find the given string.
public copyUntil ( string $string, boolean $char = false, boolean $escape = false ) : string
$string string
$char boolean
$escape boolean
리턴 string

copyUntilUnless() 공개 메소드

Copies the content until the string is found and return it unless the 'unless' is found in the substring.
public copyUntilUnless ( string $string, string $unless ) : string
$string string
$unless string
리턴 string

fastForward() 공개 메소드

Moves the current position forward.
public fastForward ( integer $count )
$count integer

getPosition() 공개 메소드

Returns the current position of the content.
public getPosition ( ) : integer
리턴 integer

rewind() 공개 메소드

Moves the current position backward.
public rewind ( integer $count )
$count integer

skip() 공개 메소드

Skip a given set of characters.
public skip ( string $string, boolean $copy = false )
$string string
$copy boolean

skipByToken() 공개 메소드

Skip a given token of pre-defined characters.
public skipByToken ( string $token, boolean $copy = false ) : null | string
$token string
$copy boolean
리턴 null | string

프로퍼티 상세

$attr 보호되어 있는 프로퍼티

protected $attr

$blank 보호되어 있는 프로퍼티

The following 4 strings are tags that are important to us.
protected string $blank
리턴 string

$content 보호되어 있는 프로퍼티

The content string.
protected string $content
리턴 string

$equal 보호되어 있는 프로퍼티

protected $equal

$pos 보호되어 있는 프로퍼티

The current position we are in the content.
protected int $pos
리턴 integer

$size 보호되어 있는 프로퍼티

The size of the content.
protected int $size
리턴 integer

$slash 보호되어 있는 프로퍼티

protected $slash