PHP Class DebugKit\View\Helper\TidyHelper

Passes html through tidy on the command line, and reports markup errors
Inheritance: extends Cake\View\Helper
Datei anzeigen Open project: cakephp/debug_kit

Public Properties

Property Type Description
$helpers array helpers property
$results results property

Public Methods

Method Description
process ( string $html = '', &$out = '' ) : array Return a nested array of errors for the passed html string Fudge the markup slightly so that the tag which is invalid is highlighted
report ( mixed $html = null ) : string report method
tidyErrors ( string $in = '', &$out = '' ) : string Run the html string through tidy, and return the (raw) errors. pass back a reference to the normalized string so that the error messages can be linked to the line that caused them.

Protected Methods

Method Description
_exec ( mixed $cmd, &$out = null ) : boolean exec method

Method Details

_exec() protected method

exec method
protected _exec ( mixed $cmd, &$out = null ) : boolean
$cmd mixed ''
return boolean True if successful

process() public method

Return a nested array of errors for the passed html string Fudge the markup slightly so that the tag which is invalid is highlighted
public process ( string $html = '', &$out = '' ) : array
$html string ''
return array

report() public method

Call process if a string is passed, or no prior results exist - and return the results using the toolbar helper to generate a nested navigatable array
public report ( mixed $html = null ) : string
$html mixed null
return string

tidyErrors() public method

Run the html string through tidy, and return the (raw) errors. pass back a reference to the normalized string so that the error messages can be linked to the line that caused them.
public tidyErrors ( string $in = '', &$out = '' ) : string
$in string ''
return string

Property Details

$helpers public_oe property

helpers property
public array $helpers
return array

$results public_oe property

results property
public $results