PHP 클래스 Whoops\Handler\PrettyPageHandler

상속: extends Whoops\Handler\Handler
파일 보기 프로젝트 열기: filp/whoops 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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