PHP Class syntax_plugin_data_table, dokuwiki-plugin-data

Inheritance: extends DokuWiki_Syntax_Plugin
Show file Open project: splitbrain/dokuwiki-plugin-data Class Usage Examples

Public Properties

Property Type Description
$dthlp will hold the data helper plugin
$sums

Protected Properties

Property Type Description
$after_item
$after_val
$before_item
$before_val

Public Methods

Method Description
__construct ( ) Constructor. Load helper plugin
_buildSQL ( &$data ) : boolean | string Builds the SQL query from the given data
connectTo ( $mode ) Connect pattern to lexer
getPType ( ) What about paragraphs?
getSort ( ) Where to sort in?
getType ( ) What kind of syntax are we?
handle ( string $match, integer $state, integer $pos, Doku_Handler $handler ) : boolean | array Handle the match - parse the data
hasRequestFilter ( ) : boolean Check whether a sort or filter request parameters are available
nullList ( array $data, array $clist, Doku_Renderer $R ) Create an empty table
postList ( array $data, integer $rowcnt ) : string Create table footer
preList ( array $clist, array $data ) : string Create table header
render ( string $format, Doku_Renderer $R, array $data ) : boolean Handles the actual output creation.
updateSQLwithQuery ( array &$data ) Handle request paramaters, rebuild sql when needed

Protected Methods

Method Description
afterVal ( array &$data, integer $colno ) : string After value in table cell
beforeVal ( array &$data, integer $colno ) : string Before value in table cell
parseValues ( string $line ) : array Split values at the commas, - Wrap with quotes to escape comma, quotes escaped by two quotes - Within quotes spaces are stored.

Method Details

__construct() public method

Constructor. Load helper plugin
public __construct ( )

_buildSQL() public method

Builds the SQL query from the given data
public _buildSQL ( &$data ) : boolean | string
return boolean | string SQL query or false

afterVal() protected method

After value in table cell
protected afterVal ( array &$data, integer $colno ) : string
$data array
$colno integer
return string

beforeVal() protected method

Before value in table cell
protected beforeVal ( array &$data, integer $colno ) : string
$data array instructions by handler
$colno integer column number
return string

connectTo() public method

Connect pattern to lexer
public connectTo ( $mode )

getPType() public method

What about paragraphs?
public getPType ( )

getSort() public method

Where to sort in?
public getSort ( )

getType() public method

What kind of syntax are we?
public getType ( )

handle() public method

This parsing is shared between the multiple different output/control syntaxes
public handle ( string $match, integer $state, integer $pos, Doku_Handler $handler ) : boolean | array
$match string The text matched by the patterns
$state integer The lexer state for the match
$pos integer The character position of the matched text
$handler Doku_Handler The Doku_Handler object
return boolean | array Return an array with all data you want to use in render, false don't add an instruction

hasRequestFilter() public method

Check whether a sort or filter request parameters are available
public hasRequestFilter ( ) : boolean
return boolean

nullList() public method

Create an empty table
public nullList ( array $data, array $clist, Doku_Renderer $R )
$data array instruction by handler()
$clist array keys of the columns
$R Doku_Renderer

parseValues() protected method

Split values at the commas, - Wrap with quotes to escape comma, quotes escaped by two quotes - Within quotes spaces are stored.
protected parseValues ( string $line ) : array
$line string
return array

postList() public method

Create table footer
public postList ( array $data, integer $rowcnt ) : string
$data array instruction by handler()
$rowcnt integer number of rows
return string html of table footer

preList() public method

Create table header
public preList ( array $clist, array $data ) : string
$clist array keys of the columns
$data array instruction by handler
return string html of table header

render() public method

Handles the actual output creation.
public render ( string $format, Doku_Renderer $R, array $data ) : boolean
$format string output format being rendered
$R Doku_Renderer the current renderer object
$data array data created by handler()
return boolean rendered correctly? (however, returned value is not used at the moment)

updateSQLwithQuery() public method

Handle request paramaters, rebuild sql when needed
public updateSQLwithQuery ( array &$data )
$data array instruction by handler()

Property Details

$after_item protected property

protected $after_item

$after_val protected property

protected $after_val

$before_item protected property

protected $before_item

$before_val protected property

protected $before_val

$dthlp public property

will hold the data helper plugin
public $dthlp

$sums public property

public $sums