Documentation

InvalidTag
in package
implements Tag

This class represents an exception during the tag creation

Since the internals of the library are relaying on the correct syntax of a docblock we cannot simply throw exceptions at all time because the exceptions will break the creation of a docklock. Just silently ignore the exceptions is not an option because the user as an issue to fix.

This tag holds that error information until a using application is able to display it. The object wil just behave like any normal tag. So the normal application flow will not break.

Interfaces, Classes, Traits and Enums

Tag

Table of Contents

$body  : string
$name  : string
$throwable  : Throwable|null
__toString()  : string
create()  : Tag|mixed
getException()  : Throwable|null
getName()  : string
render()  : string
withError()  : self
__construct()  : mixed
flattenArguments()  : mixed
flattenExceptionBacktrace()  : void
Removes all complex types from backtrace

Properties

Methods

__toString()

public __toString() : string
Return values
string —

create()

public static create(string $body[, string $name = '' ]) : Tag|mixed
Parameters
$body : string
$name : string = ''
Return values
Tag|mixed —

Class that implements Tag

getException()

public getException() : Throwable|null
Return values
Throwable|null —

getName()

public getName() : string
Return values
string —

render()

public render([Formatter|null $formatter = null ]) : string
Parameters
$formatter : Formatter|null = null
Return values
string —

withError()

public withError(Throwable $exception) : self
Parameters
$exception : Throwable
Return values
self —

__construct()

private __construct(string $name, string $body) : mixed
Parameters
$name : string
$body : string
Return values
mixed —

flattenArguments()

private flattenArguments(mixed $value) : mixed
Parameters
$value : mixed
Tags
throws
ReflectionException
Return values
mixed —

flattenExceptionBacktrace()

Removes all complex types from backtrace

private flattenExceptionBacktrace(Throwable $exception) : void

Not all objects are serializable. So we need to remove them from the stored exception to be sure that we do not break existing library usage.

Parameters
$exception : Throwable
Return values
void —

Search results