PHP 클래스 PhpParser\Error

상속: extends RuntimeException
파일 보기 프로젝트 열기: nikic/php-parser 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$attributes
$rawMessage

공개 메소드들

메소드 설명
__construct ( string $message, array | integer $attributes = [] ) Creates an Exception signifying a parse error.
getAttributes ( ) : array Gets the attributes of the node/token the error occurred at.
getEndColumn ( string $code ) : integer Gets the end column (1-based) into the line where the error ended.
getEndLine ( ) : integer Gets the line the error ends in.
getMessageWithColumnInfo ( $code )
getRawMessage ( ) : string Gets the error message
getStartColumn ( string $code ) : integer Gets the start column (1-based) into the line where the error started.
getStartLine ( ) : integer Gets the line the error starts in.
hasColumnInfo ( ) : boolean Returns whether the error has start and end column information.
setAttributes ( array $attributes ) Sets the attributes of the node/token the error occured at.
setRawMessage ( string $message ) Sets the line of the PHP file the error occurred in.
setStartLine ( integer $line ) Sets the line the error starts in.

보호된 메소드들

메소드 설명
updateMessage ( ) Updates the exception message after a change to rawMessage or rawLine.

비공개 메소드들

메소드 설명
toColumn ( $code, $pos )

메소드 상세

__construct() 공개 메소드

Creates an Exception signifying a parse error.
public __construct ( string $message, array | integer $attributes = [] )
$message string Error message
$attributes array | integer Attributes of node/token where error occurred (or start line of error -- deprecated)

getAttributes() 공개 메소드

Gets the attributes of the node/token the error occurred at.
public getAttributes ( ) : array
리턴 array

getEndColumn() 공개 메소드

Gets the end column (1-based) into the line where the error ended.
public getEndColumn ( string $code ) : integer
$code string Source code of the file
리턴 integer

getEndLine() 공개 메소드

Gets the line the error ends in.
public getEndLine ( ) : integer
리턴 integer Error end line

getMessageWithColumnInfo() 공개 메소드

public getMessageWithColumnInfo ( $code )

getRawMessage() 공개 메소드

Gets the error message
public getRawMessage ( ) : string
리턴 string Error message

getStartColumn() 공개 메소드

Gets the start column (1-based) into the line where the error started.
public getStartColumn ( string $code ) : integer
$code string Source code of the file
리턴 integer

getStartLine() 공개 메소드

Gets the line the error starts in.
public getStartLine ( ) : integer
리턴 integer Error start line

hasColumnInfo() 공개 메소드

For column information enable the startFilePos and endFilePos in the lexer options.
public hasColumnInfo ( ) : boolean
리턴 boolean

setAttributes() 공개 메소드

Sets the attributes of the node/token the error occured at.
public setAttributes ( array $attributes )
$attributes array

setRawMessage() 공개 메소드

Sets the line of the PHP file the error occurred in.
public setRawMessage ( string $message )
$message string Error message

setStartLine() 공개 메소드

Sets the line the error starts in.
public setStartLine ( integer $line )
$line integer Error start line

updateMessage() 보호된 메소드

Updates the exception message after a change to rawMessage or rawLine.
protected updateMessage ( )

프로퍼티 상세

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

protected $attributes

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

protected $rawMessage