class CliDebugView extends DebugView

A basic HTML wrapper for stylish rendering of a developement info view.

Used to output error messages, and test results.

Traits

Provides extensions to this object to integrate it with standard config API methods.
A class that can be instantiated or replaced via DI

Methods

static Config_ForClass
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .

mixed
stat(string $name) deprecated

Get inherited config value

mixed
uninherited(string $name)

Gets the uninherited value for the given config option

$this
set_stat(string $name, mixed $value) deprecated

Update the config value for a given property

static Injectable
create(array $args)

An implementation of the factory method, allows you to create an instance of a class

static Injectable
singleton(string $class = null)

Creates a class instance by the "singleton" design pattern.

string
Breadcrumbs()

Generate breadcrumb links to the URL path being displayed

from DebugView
writeHeader() deprecated

No description

from DebugView
writeInfo($title, $subtitle, $description = false) deprecated

No description

from DebugView
writeFooter() deprecated

No description

from DebugView
writeError($httpRequest, $errno, $errstr, $errfile, $errline) deprecated

No description

from DebugView
writeSourceFragment($lines, $errline) deprecated

No description

from DebugView
writeTrace($trace) deprecated

No description

from DebugView
writeVariable($val, $caller) deprecated

No description

from DebugView
string
renderHeader(HTTPRequest $httpRequest = null)

Render HTML header for development views

string
renderInfo(string $title, string $subtitle, string|bool $description = null)

Render the information header for the view

string
renderFooter()

Render HTML footer for development views

string
renderError(string $httpRequest, int $errno, string $errstr, string $errfile, int $errline)

Write information about the error to the screen

string
renderSourceFragment(array $lines, int $errline)

Write a fragment of the a source file

string
renderTrace(array $trace = null)

Write a backtrace

string
renderParagraph(string $text)

Render an arbitrary paragraph.

string
renderVariable(object $val, array $caller)

Outputs a variable in a user presentable way

renderMessage($message, $caller, $showHeader = true)

No description

string
debugVariable(mixed $val, array $caller, bool $showHeader = true)

Similar to renderVariable() but respects debug() method on object if available

string
debugVariableText(mixed $val)

Get debug text for this object

Details

in Configurable at line 20
static Config_ForClass config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .

....).

Return Value

Config_ForClass

in Configurable at line 32
mixed stat(string $name) deprecated

deprecated 5.0 Use ->config()->get() instead

Get inherited config value

Parameters

string $name

Return Value

mixed

in Configurable at line 44
mixed uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

in Configurable at line 57
$this set_stat(string $name, mixed $value) deprecated

deprecated 5.0 Use ->config()->set() instead

Update the config value for a given property

Parameters

string $name
mixed $value

Return Value

$this

in Injectable at line 26
static Injectable create(array $args)

An implementation of the factory method, allows you to create an instance of a class

This method will defer class substitution to the Injector API, which can be customised via the Config API to declare substitution classes.

This can be called in one of two ways - either calling via the class directly, or calling on Object and passing the class name as the first parameter. The following are equivalent: $list = DataList::create('SiteTree'); $list = SiteTree::get();

Parameters

array $args

Return Value

Injectable

in Injectable at line 43
static Injectable singleton(string $class = null)

Creates a class instance by the "singleton" design pattern.

It will always return the same instance for this class, which can be used for performance reasons and as a simple way to access instance methods which don't rely on instance data (e.g. the custom SilverStripe static handling).

Parameters

string $class Optional classname to create, if the called class should not be used

Return Value

Injectable The singleton instance

in DebugView at line 125
string Breadcrumbs()

Generate breadcrumb links to the URL path being displayed

Return Value

string

in DebugView at line 148
writeHeader() deprecated

deprecated 4.0.0:5.0.0 Use renderHeader() instead

in DebugView at line 157
writeInfo($title, $subtitle, $description = false) deprecated

deprecated 4.0.0:5.0.0 Use renderInfo() instead

Parameters

$title
$subtitle
$description

in DebugView at line 166
writeFooter() deprecated

deprecated 4.0.0:5.0.0 Use renderFooter() instead

in DebugView at line 175
writeError($httpRequest, $errno, $errstr, $errfile, $errline) deprecated

deprecated 4.0.0:5.0.0 Use renderError() instead

Parameters

$httpRequest
$errno
$errstr
$errfile
$errline

in DebugView at line 184
writeSourceFragment($lines, $errline) deprecated

deprecated 4.0.0:5.0.0 Use renderSourceFragment() instead

Parameters

$lines
$errline

in DebugView at line 193
writeTrace($trace) deprecated

deprecated 4.0.0:5.0.0 Use renderTrace() instead

Parameters

$trace

in DebugView at line 202
writeVariable($val, $caller) deprecated

deprecated 4.0.0:5.0.0 Use renderVariable() instead

Parameters

$val
$caller

at line 24
string renderHeader(HTTPRequest $httpRequest = null)

Render HTML header for development views

Parameters

HTTPRequest $httpRequest

Return Value

string

at line 106
string renderInfo(string $title, string $subtitle, string|bool $description = null)

Render the information header for the view

Parameters

string $title The main title
string $subtitle The subtitle
string|bool $description The description to show

Return Value

string

at line 32
string renderFooter()

Render HTML footer for development views

Return Value

string

at line 46
string renderError(string $httpRequest, int $errno, string $errstr, string $errfile, int $errline)

Write information about the error to the screen

Parameters

string $httpRequest the kind of request
int $errno Codenumber of the error
string $errstr The error message
string $errfile The name of the soruce code file where the error occurred
int $errline The line number on which the error occured

Return Value

string

at line 66
string renderSourceFragment(array $lines, int $errline)

Write a fragment of the a source file

Parameters

array $lines An array of file lines; the keys should be the original line numbers
int $errline The line of the error

Return Value

string

at line 85
string renderTrace(array $trace = null)

Write a backtrace

Parameters

array $trace The debug_backtrace() array

Return Value

string

at line 93
string renderParagraph(string $text)

Render an arbitrary paragraph.

Parameters

string $text The HTML-escaped text to render

Return Value

string

at line 116
string renderVariable(object $val, array $caller)

Outputs a variable in a user presentable way

Parameters

object $val
array $caller Caller information

Return Value

string

at line 196
renderMessage($message, $caller, $showHeader = true)

Parameters

$message
$caller
$showHeader

at line 143
string debugVariable(mixed $val, array $caller, bool $showHeader = true)

Similar to renderVariable() but respects debug() method on object if available

Parameters

mixed $val
array $caller
bool $showHeader

Return Value

string

at line 160
string debugVariableText(mixed $val)

Get debug text for this object

Parameters

mixed $val

Return Value

string