PHP Class Kraken\Throwable\ThrowableProxy

Its main purpose is to create a placeholders for Throwable most needed data discarding all not needed traces. TLDR: This class should be used in design patterns which logic represents failures as throwables, and does not necessarily need stack information.
Show file Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$class string
$message string
$prev Error | Exception | ThrowableProxy | null

Public Methods

Method Description
__construct ( Error | Exception | string[] | string $throwableOrMessage )
__destruct ( )
__toString ( ) : string Format proxied Throwable as string.
getCode ( ) : integer Return proxied Throwable code.
getFile ( ) : string Return proxied Throwable file.
getLine ( ) : integer Return proxied Throwable code.
getMessage ( ) : string Return proxied Throwable message.
getPrevious ( ) : Error | Exception | null Return proxied Throwable previous element.
getTrace ( ) : array Return proxied Throwable trace.
getTraceAsString ( ) : string Return proxied Throwable trace in string format.
toThrowable ( ) : Error | Exception Return proxied Throwable.

Method Details

__construct() public method

public __construct ( Error | Exception | string[] | string $throwableOrMessage )
$throwableOrMessage Error | Exception | string[] | string

__destruct() public method

public __destruct ( )

__toString() public method

Format proxied Throwable as string.
public __toString ( ) : string
return string

getCode() final public method

Return proxied Throwable code.
final public getCode ( ) : integer
return integer

getFile() final public method

Return proxied Throwable file.
final public getFile ( ) : string
return string

getLine() final public method

Return proxied Throwable code.
final public getLine ( ) : integer
return integer

getMessage() final public method

Return proxied Throwable message.
final public getMessage ( ) : string
return string

getPrevious() final public method

Return proxied Throwable previous element.
final public getPrevious ( ) : Error | Exception | null
return Error | Exception | null

getTrace() final public method

Return proxied Throwable trace.
final public getTrace ( ) : array
return array

getTraceAsString() final public method

Return proxied Throwable trace in string format.
final public getTraceAsString ( ) : string
return string

toThrowable() public method

Return proxied Throwable.
public toThrowable ( ) : Error | Exception
return Error | Exception

Property Details

$class protected property

protected string $class
return string

$message protected property

protected string $message
return string

$prev protected property

protected Error,Kraken\Throwable|Exception,Kraken\Throwable|ThrowableProxy,Kraken\Throwable|null $prev
return Error | Exception | ThrowableProxy | null