Copied!

HTML Validator message

CloneableInstantiable
Methods
public __construct(array $info)
 

Constructs a new message object

public __toString() : string
 

Transforms message to a human-readable string

public format( $html = false)
 

Format the message in readable format

public getExtract()
 

Get an extract of the problematic area

public getFirstColumn()
 

Get start column where the error occured

public getFirstLine()
 

Get line number of first line where the error occured

public getHighlightLength()
 

Get length of the substring to highlight

public getHighlightStart()
 

Get index offset of substring to highlight (within extract)

public getLastColumn()
 

Get last column where the error occured

public getLastLine()
 

Get line number of last line where the error occured

public getText()
 

Get a text description of the message

public getType()
 

Get the message type for this message

public setHighlightClassName( $className)
 

Set the class name to use for the highlighted span.

Default: "highlight"

public setHighlighter( $highlighter)
 

Set function to use for highlighting a substring within a string
Callable arguments:
(string) $string - The full string in which to find the substring
(int) $start - Start index of the substring to highlight
(int) $length - Length of substring to highlight

public toHTML()
 

Transforms message to a human-readable HTML string

Properties
private $defaults
 

Default message values

private $extract
 

An extract of an area where the error occured

private $firstColumn
 

First column index of where the error occured

private $firstLine
 

Line number of where the error first occured

private $highlightClassName
 

CSS class name to use for the highlighted substring
(Only used if no custom highlighter is set)

private $highlighter
 

Callable highlighter function, overridable by user

private $hiliteLength
 

Length of highlighted string, within extract

private $hiliteStart
 

String offset within extract where the highlight should be started

private $lastColumn
 

Last column index of where the error occured

private $lastLine
 

Line number of where the error last occured

private $text
 

Text describing the error

private $type
Methods
private highlight( $str, $start, $length)
 

Highlight the given string, enclosing it in a span

© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration