PHP Класс Whoops\Handler\PrettyPageHandler

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

Защищенные свойства (Protected)

Свойство Тип Описание
$editor mixed A string identifier for a known IDE/text editor, or a closure that resolves a string that can be used to open a given file in an editor. If the string contains the special substrings %file or %line, they will be replaced with the correct data.
$editors array A list of known editor strings

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

Метод Описание
__construct ( ) Constructor.
addCustomCss ( string $name ) : void Adds a custom css file to be loaded.
addDataTable ( string $label, array $data ) Adds an entry to the list of tables displayed in the template.
addDataTableCallback ( string $label, callable $callback ) Lazily adds an entry to the list of tables displayed in the table.
addEditor ( string $identifier, string $resolver ) Adds an editor resolver, identified by a string name, and that may be a string path, or a callable resolver. If the callable returns a string, it will be set as the file reference's href attribute.
addResourcePath ( string $path ) : void Adds a path to the list of paths to be searched for resources.
getApplicationPaths ( ) : array Return the application paths.
getDataTables ( string | null $label = null ) : array[] | callable Returns all the extra data tables registered with this handler.
getEditorAjax ( string $filePath, integer $line ) : boolean Given a boolean if the editor link should act as an Ajax request. The editor must be a valid callable function/closure
getEditorHref ( string $filePath, integer $line ) : string | boolean Given a string file path, and an integer file line, executes the editor resolver and returns, if available, a string that may be used as the href property for that file reference.
getPageTitle ( ) : string
getResourcePaths ( ) : array
getResourcesPath ( ) : string
handle ( ) : integer | null
handleUnconditionally ( boolean | null $value = null ) : boolean | null Allows to disable all attempts to dynamically decide whether to handle or return prematurely.
setApplicationPaths ( array $applicationPaths ) Set the application paths.
setEditor ( string | callable $editor ) Set the editor to use to open referenced files, by a string identifier, or a callable that will be executed for every file reference, with a $file and $line argument, and should return a string.
setPageTitle ( string $title ) : void
setResourcesPath ( string $resourcesPath ) : void

Защищенные методы

Метод Описание
getEditor ( string $filePath, integer $line ) : mixed Given a boolean if the editor link should act as an Ajax request. The editor must be a valid callable function/closure
getResource ( string $resource ) : string Finds a resource, by its relative path, in all available search paths.

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

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

Constructor.
public __construct ( )

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

Adds a custom css file to be loaded.
public addCustomCss ( string $name ) : void
$name string
Результат void

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

The expected data is a simple associative array. Any nested arrays will be flattened with print_r
public addDataTable ( string $label, array $data )
$label string
$data array

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

The supplied callback argument will be called when the error is rendered, it should produce a simple associative array. Any nested arrays will be flattened with print_r.
public addDataTableCallback ( string $label, callable $callback )
$label string
$callback callable Callable returning an associative array

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

Adds an editor resolver, identified by a string name, and that may be a string path, or a callable resolver. If the callable returns a string, it will be set as the file reference's href attribute.
public addEditor ( string $identifier, string $resolver )
$identifier string
$resolver string

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

Adds a path to the list of paths to be searched for resources.
public addResourcePath ( string $path ) : void
$path string
Результат void

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

Return the application paths.
public getApplicationPaths ( ) : array
Результат array

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

Optionally accepts a 'label' parameter, to only return the data table under that label.
public getDataTables ( string | null $label = null ) : array[] | callable
$label string | null
Результат array[] | callable

getEditor() защищенный Метод

Given a boolean if the editor link should act as an Ajax request. The editor must be a valid callable function/closure
protected getEditor ( string $filePath, integer $line ) : mixed
$filePath string
$line integer
Результат mixed

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

Given a boolean if the editor link should act as an Ajax request. The editor must be a valid callable function/closure
public getEditorAjax ( string $filePath, integer $line ) : boolean
$filePath string
$line integer
Результат boolean

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

Given a string file path, and an integer file line, executes the editor resolver and returns, if available, a string that may be used as the href property for that file reference.
public getEditorHref ( string $filePath, integer $line ) : string | boolean
$filePath string
$line integer
Результат string | boolean

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

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

getResource() защищенный Метод

The search is performed starting at the last search path, and all the way back to the first, enabling a cascading-type system of overrides for all resources.
protected getResource ( string $resource ) : string
$resource string
Результат string

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

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

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

Устаревший:
public getResourcesPath ( ) : string
Результат string

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

public handle ( ) : integer | null
Результат integer | null

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

Set this to ensure that the handler will perform no matter what.
public handleUnconditionally ( boolean | null $value = null ) : boolean | null
$value boolean | null
Результат boolean | null

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

Set the application paths.
public setApplicationPaths ( array $applicationPaths )
$applicationPaths array

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

Set the editor to use to open referenced files, by a string identifier, or a callable that will be executed for every file reference, with a $file and $line argument, and should return a string.
public setEditor ( string | callable $editor )
$editor string | callable

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

public setPageTitle ( string $title ) : void
$title string
Результат void

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

Устаревший:
public setResourcesPath ( string $resourcesPath ) : void
$resourcesPath string
Результат void

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

$editor защищенное свойство

A string identifier for a known IDE/text editor, or a closure that resolves a string that can be used to open a given file in an editor. If the string contains the special substrings %file or %line, they will be replaced with the correct data.
protected mixed $editor
Результат mixed

$editors защищенное свойство

A list of known editor strings
protected array $editors
Результат array