BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
PhpParser\Error Class Reference
Inheritance diagram for PhpParser\Error:
Collaboration diagram for PhpParser\Error:

Public Member Functions

 __construct ($message, $attributes=array())
 
 getRawMessage ()
 
 getStartLine ()
 
 getEndLine ()
 
 getAttributes ()
 
 setRawMessage ($message)
 
 setStartLine ($line)
 
 hasColumnInfo ()
 
 getStartColumn ($code)
 
 getEndColumn ($code)
 
 getRawLine ()
 
 setRawLine ($line)
 

Protected Member Functions

 updateMessage ()
 

Protected Attributes

 $rawMessage
 
 $attributes
 

Constructor & Destructor Documentation

PhpParser\Error::__construct (   $message,
  $attributes = array() 
)

Creates an Exception signifying a parse error.

Parameters
string$messageError message
array | int$attributesAttributes of node/token where error occurred (or start line of error – deprecated)

Member Function Documentation

PhpParser\Error::getAttributes ( )

Gets the attributes of the node/token the error occurred at.

Returns
array
PhpParser\Error::getEndColumn (   $code)

Gets the end column (1-based) into the line where the error ended.

Parameters
string$codeSource code of the file
Returns
int
PhpParser\Error::getEndLine ( )

Gets the line the error ends in.

Returns
int Error end line
PhpParser\Error::getRawLine ( )
PhpParser\Error::getRawMessage ( )

Gets the error message

Returns
string Error message
PhpParser\Error::getStartColumn (   $code)

Gets the start column (1-based) into the line where the error started.

Parameters
string$codeSource code of the file
Returns
int
PhpParser\Error::getStartLine ( )

Gets the line the error starts in.

Returns
int Error start line
PhpParser\Error::hasColumnInfo ( )

Returns whether the error has start and end column information.

For column information enable the startFilePos and endFilePos in the lexer options.

Returns
bool
PhpParser\Error::setRawLine (   $line)
PhpParser\Error::setRawMessage (   $message)

Sets the line of the PHP file the error occurred in.

Parameters
string$messageError message
PhpParser\Error::setStartLine (   $line)

Sets the line the error starts in.

Parameters
int$lineError start line
PhpParser\Error::updateMessage ( )
protected

Updates the exception message after a change to rawMessage or rawLine.


The documentation for this class was generated from the following file: