Overview

Namespaces

  • TokenReflection
    • Broker
      • Backend
    • Dummy
    • Exception
    • Invalid
    • Php
    • Stream

Exceptions

  • BaseException
  • BrokerException
  • FileProcessingException
  • ParseException
  • RuntimeException
  • StreamException
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class ParseException

Parse exception.

Thrown while parsing source codes.

Exception
Extended by RuntimeException
Extended by TokenReflection\Exception\BaseException
Extended by TokenReflection\Exception\StreamException
Extended by TokenReflection\Exception\ParseException
Namespace: TokenReflection\Exception
Located at Exception/ParseException.php
Methods summary
public
# __construct( TokenReflection\IReflection $sender, TokenReflection\Stream\StreamBase $tokenStream, string $message, integer $code )

Constructor.

Constructor.

Parameters

$sender
TokenReflection\IReflection
$sender Reflection element
$tokenStream
TokenReflection\Stream\StreamBase
$tokenStream Token stream
$message
string
$message Exception message
$code
integer
$code Exception code

Overrides

TokenReflection\Exception\StreamException::__construct()
public array|null
# getToken( )

Returns the token where the problem was detected or NULL if the token stream was empty or an end was reached.

Returns the token where the problem was detected or NULL if the token stream was empty or an end was reached.

Returns

array|null
public string|null
# getTokenName( )

Returns the name of the token where the problem was detected or NULL if the token stream was empty or an end was reached.

Returns the name of the token where the problem was detected or NULL if the token stream was empty or an end was reached.

Returns

string|null
public integer
# getExceptionLine( )

Returns the line where the exception was thrown.

Returns the line where the exception was thrown.

Returns

integer
public integer|null
# getTokenLine( )

Returns the file line with the token or null.

Returns the file line with the token or null.

Returns

integer|null
public string|null
# getSourcePart( boolean $lineNumbers = false )

Returns the source code part around the token.

Returns the source code part around the token.

Parameters

$lineNumbers
boolean
$lineNumbers Returns the source code part with line numbers

Returns

string|null
public TokenReflection\IReflection
# getSender( )

Returns the reflection element that caused the exception to be raised.

Returns the reflection element that caused the exception to be raised.

Returns

TokenReflection\IReflection
public string
# getDetail( )

Returns an exception description detail.

Returns an exception description detail.

Returns

string

Overrides

TokenReflection\Exception\StreamException::getDetail()
Methods inherited from TokenReflection\Exception\StreamException
getFileName(), getStream()
Methods inherited from TokenReflection\Exception\BaseException
__toString(), getOutput()
Methods inherited from Exception
getCode(), getFile(), getLine(), getMessage(), getPrevious(), getTrace(), getTraceAsString()
Constants summary
integer UNEXPECTED_TOKEN 1101
#

An unexpected token was encountered.

An unexpected token was encountered.

integer LOGICAL_ERROR 1102
#

A logical error was encountered.

A logical error was encountered.

integer INVALID_PARENT 1103
#

An invalid reflection parent was provided.

An invalid reflection parent was provided.

integer SOURCE_LINES_AROUND 5
#

Minimal number of source code lines around the token.

Minimal number of source code lines around the token.

Constants inherited from TokenReflection\Exception\StreamException
NOT_READABLE, READ_BEYOND_EOS, SERIALIZATION_ERROR
Constants inherited from TokenReflection\Exception\BaseException
ALREADY_EXISTS, DOES_NOT_EXIST, INVALID_ARGUMENT, PHP_EXT_MISSING, UNSUPPORTED
Properties inherited from Exception
$code, $file, $line, $message
PHP Token Reflection API documentation generated by ApiGen 2.8.0