PHP Класс BaseException, atk4

Наследование: extends Exception
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$actions Array of available actions
$api
$app Always points to current Application
$by_exception Link to another exception which caused this one
$code error code
$more_info Array with more info
$my_backtrace Backtrace array
$name Classname of exception
$owner Link to object into which we added this object
$recommendation Plain text recommendation on how the problem can be solved
$shift Backtrace shift

Открытые методы

Метод Описание
__construct ( string $msg, string | integer $code ) On class construct.
addAction ( string | array $key, string | array $descr ) Actions will be displayed as links on the exception page allowing viewer to perform additional debug functions.
addMoreInfo ( string $key, mixed $value ) Call this to add additional information to the exception you are about to throw.
addThis ( AbstractObject $obj ) Add reference to the object.
backtrace ( integer $sh = null, array $backtrace = null ) : string
by ( Exception $e ) Records another exception as a cause of your current exception.
collectBasicData ( string | integer $code ) Collect basic data of exception.
getAdditionalMessage ( ) : string Undocumented.
getDetailedHTML ( ) : string Redefine this function to add additional HTML output.
getDocURL ( AbstractObject $o ) : boolean | string Classes define a DOC constant which points to a on-line resource containing documentation for given class. This method will return full URL for the specified object.
getHTML ( ) : string Returns HTML representation of the exception.
getHTMLActions ( ) : string
getHTMLHeader ( ) : string
getHTMLSolution ( ) : string
getHeader ( ) : string
getMyFile ( ) : string Return filename from backtrace log.
getMyLine ( ) : string Return line number from backtract log.
getMyTrace ( ) : array Return collected backtrace info.
getSolution ( ) : array
getText ( ) : string Returns Textual representation of the exception.
init ( ) Initialization.
print_r ( array | object | string $key, string $gs, string $ge, string $ls, string $le, string $ind = ' ' ) : null | string Utility.
setCode ( integer $code ) Set error code

Описание методов

__construct() публичный Метод

On class construct.
public __construct ( string $msg, string | integer $code )
$msg string Error message
$code string | integer Error code

addAction() публичный Метод

addAction('show info',array('info'=>true)) will result in link to &info=1.
public addAction ( string | array $key, string | array $descr )
$key string | array
$descr string | array

addMoreInfo() публичный Метод

Call this to add additional information to the exception you are about to throw.
public addMoreInfo ( string $key, mixed $value )
$key string
$value mixed

addThis() публичный Метод

Do not call this directly, exception() method takes care of that.
public addThis ( AbstractObject $obj )
$obj AbstractObject

backtrace() публичный Метод

public backtrace ( integer $sh = null, array $backtrace = null ) : string
$sh integer
$backtrace array
Результат string

by() публичный Метод

Wrapping one exception inside another helps you to track problems better.
public by ( Exception $e )
$e Exception

collectBasicData() публичный Метод

Collect basic data of exception.
public collectBasicData ( string | integer $code )
$code string | integer Error code

getAdditionalMessage() публичный Метод

Undocumented.
public getAdditionalMessage ( ) : string
Результат string

getDetailedHTML() публичный Метод

Redefine this function to add additional HTML output.
public getDetailedHTML ( ) : string
Результат string

getDocURL() публичный Метод

Classes define a DOC constant which points to a on-line resource containing documentation for given class. This method will return full URL for the specified object.
public getDocURL ( AbstractObject $o ) : boolean | string
$o AbstractObject
Результат boolean | string

getHTML() публичный Метод

Returns HTML representation of the exception.
public getHTML ( ) : string
Результат string

getHTMLActions() публичный Метод

public getHTMLActions ( ) : string
Результат string

getHTMLHeader() публичный Метод

public getHTMLHeader ( ) : string
Результат string

getHTMLSolution() публичный Метод

public getHTMLSolution ( ) : string
Результат string

getHeader() публичный Метод

public getHeader ( ) : string
Результат string

getMyFile() публичный Метод

Return filename from backtrace log.
public getMyFile ( ) : string
Результат string

getMyLine() публичный Метод

Return line number from backtract log.
public getMyLine ( ) : string
Результат string

getMyTrace() публичный Метод

Return collected backtrace info.
public getMyTrace ( ) : array
Результат array

getSolution() публичный Метод

public getSolution ( ) : array
Результат array

getText() публичный Метод

Returns Textual representation of the exception.
public getText ( ) : string
Результат string

init() публичный Метод

Initialization.
public init ( )

print_r() публичный Метод

Utility.
public print_r ( array | object | string $key, string $gs, string $ge, string $ls, string $le, string $ind = ' ' ) : null | string
$key array | object | string
$gs string
$ge string
$ls string
$le string
$ind string
Результат null | string

setCode() публичный Метод

Set error code
public setCode ( integer $code )
$code integer

Описание свойств

$actions публичное свойство

Array of available actions
public $actions

$api публичное свойство

Устаревший: 4.3.0 Left for compatibility with ATK 4.2 and lower, use ->app instead
public $api

$app публичное свойство

Always points to current Application
public $app

$by_exception публичное свойство

Link to another exception which caused this one
public $by_exception

$code публичное свойство

error code
public $code

$more_info публичное свойство

Array with more info
public $more_info

$my_backtrace публичное свойство

Backtrace array
public $my_backtrace

$name публичное свойство

Classname of exception
public $name

$owner публичное свойство

Link to object into which we added this object
public $owner

$recommendation публичное свойство

Plain text recommendation on how the problem can be solved
public $recommendation

$shift публичное свойство

Backtrace shift
public $shift