PHP Class helper_plugin_data, dokuwiki-plugin-data

Inheritance: extends DokuWiki_Plugin
Afficher le fichier Open project: splitbrain/dokuwiki-plugin-data Class Usage Examples

Protected Properties

Свойство Type Description
$aliases stores the alias definitions
$db initialized via _getDb()
$locs stores custom key localizations

Méthodes publiques

Méthode Description
__construct ( ) Constructor
_a2ua ( string $name, string | array $array ) : array prepare an array to be passed through buildURLparams()
_addPrePostFixes ( string | array $type, string $val, string $pre = '', string $post = '' ) : string Add pre and postfixs to the given value
_aliases ( ) : array Load defined type aliases
_cleanData ( string $value, string | array $type ) : string Makes sure the given data fits with the given type
_column ( string $col ) Split a column name into its parts
_formatData ( array $column, string $value, Doku_Renderer_xhtml $R ) : string Return XHTML formated data, depending on column type
_getDB ( ) : helper_plugin_sqlite | false load the sqlite helper
_getTagUrlparam ( array $column, string $tag ) : array Get url parameters, remove all filters for given column and add filter for desired tag
_get_current_param ( boolean $returnURLparams = true ) : array get current URL parameters
_get_filters ( ) : array Get filters given in the request via GET or POST
_parse_filter ( $filterline ) : array | boolean Parse a filter line into an array
_replacePlaceholdersInSQL ( &$data ) Replace placeholders in sql
_resolveData ( string $value, string $colname ) : string Resolve a value according to its column settings
ensureAbsoluteId ( $id )
makeTranslationReplacement ( string $data ) : string Replace translation related placeholders in given string
ready ( ) : boolean Simple function to check if the database is ready to use

Méthodes protégées

Méthode Description
determineLang ( ) : mixed Return language code

Private Methods

Méthode Description
loadLocalizedLabels ( )
replacePlaceholders ( string $value ) : string Perform replacements on the output values

Method Details

__construct() public méthode

Loads custom translations
public __construct ( )

_a2ua() public méthode

prepare an array to be passed through buildURLparams()
public _a2ua ( string $name, string | array $array ) : array
$name string keyname
$array string | array value or key-value pairs
Résultat array

_addPrePostFixes() public méthode

$type may be an column array with pre and postfixes
public _addPrePostFixes ( string | array $type, string $val, string $pre = '', string $post = '' ) : string
$type string | array
$val string
$pre string
$post string
Résultat string

_aliases() public méthode

Load defined type aliases
public _aliases ( ) : array
Résultat array

_cleanData() public méthode

Makes sure the given data fits with the given type
public _cleanData ( string $value, string | array $type ) : string
$value string
$type string | array
Résultat string

_column() public méthode

Split a column name into its parts
public _column ( string $col )
$col string column name

_formatData() public méthode

Return XHTML formated data, depending on column type
public _formatData ( array $column, string $value, Doku_Renderer_xhtml $R ) : string
$column array
$value string
$R Doku_Renderer_xhtml
Résultat string

_getDB() public méthode

load the sqlite helper
public _getDB ( ) : helper_plugin_sqlite | false
Résultat helper_plugin_sqlite | false plugin or false if failed

_getTagUrlparam() public méthode

Get url parameters, remove all filters for given column and add filter for desired tag
public _getTagUrlparam ( array $column, string $tag ) : array
$column array
$tag string
Résultat array of url parameters

_get_current_param() public méthode

get current URL parameters
public _get_current_param ( boolean $returnURLparams = true ) : array
$returnURLparams boolean
Résultat array with dataflt, datasrt and dataofs parameters

_get_filters() public méthode

Get filters given in the request via GET or POST
public _get_filters ( ) : array
Résultat array

_parse_filter() public méthode

Parse a filter line into an array
public _parse_filter ( $filterline ) : array | boolean
$filterline
Résultat array | boolean - array on success, false on error

_replacePlaceholdersInSQL() public méthode

Replace placeholders in sql
public _replacePlaceholdersInSQL ( &$data )

_resolveData() public méthode

This function is registered as a SQL function named DATARESOLVE
public _resolveData ( string $value, string $colname ) : string
$value string
$colname string
Résultat string

determineLang() protected méthode

Return language code
protected determineLang ( ) : mixed
Résultat mixed

ensureAbsoluteId() public méthode

public ensureAbsoluteId ( $id )

makeTranslationReplacement() public méthode

Replace translation related placeholders in given string
public makeTranslationReplacement ( string $data ) : string
$data string
Résultat string

ready() public méthode

Simple function to check if the database is ready to use
public ready ( ) : boolean
Résultat boolean

Property Details

$aliases protected_oe property

stores the alias definitions
protected $aliases

$db protected_oe property

initialized via _getDb()
protected $db

$locs protected_oe property

stores custom key localizations
protected $locs