Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | List of all members
SMW\Query\DebugFormatter Class Reference

Public Member Functions

 __construct (?string $type='', string $format='')
 
 setName (string $name)
 
 getFormat ()
 
 buildHTML (array $entries, Query $query=null)
 
 prettifyExplain (iterable $res)
 
 prettifySPARQL ( $sparql)
 
 prettifySQL ( $sql, $alias)
 

Public Attributes

const JSON_FORMAT = 'json'
 

Detailed Description

GNU GPL v2+

Since
2.0
Author
mwjames
Markus Krötzsch

Constructor & Destructor Documentation

◆ __construct()

SMW\Query\DebugFormatter::__construct ( ?string  $type = '',
string  $format = '' 
)
Since
3.0
Parameters
string | null$type
string$format

Member Function Documentation

◆ buildHTML()

SMW\Query\DebugFormatter::buildHTML ( array  $entries,
Query  $query = null 
)

Generate textual debug output that shows an arbitrary list of informative fields. Used for formatting query debug output.

Note
All strings given must be usable and safe in wiki and HTML contexts.
Parameters
$entriesarray of name => value of informative entries to display
$querySMWQuery or null, if given add basic data about this query as well
Returns
string

◆ getFormat()

SMW\Query\DebugFormatter::getFormat ( )
Since
3.2
Returns
string

◆ prettifyExplain()

SMW\Query\DebugFormatter::prettifyExplain ( iterable  $res)
Since
2.5
Parameters
array$rows
Returns
string

◆ prettifySPARQL()

SMW\Query\DebugFormatter::prettifySPARQL (   $sparql)
Since
2.5
Parameters
string$sparql
Returns
string

◆ prettifySQL()

SMW\Query\DebugFormatter::prettifySQL (   $sql,
  $alias 
)
Since
2.5
Parameters
string$sql
string$alias
Returns
string

◆ setName()

SMW\Query\DebugFormatter::setName ( string  $name)
Since
3.2
Parameters
string$name

The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy