Documentation du code de SPIP et de ses plugins

TextWheel pour SPIP

TextWheelRuleSet extends TextWheelDataSet
in package

Table of Contents

Properties

$data  : mixed
$sorted  : mixed

Methods

__construct()  : mixed
Constructor
addRule()  : mixed
add a rule
addRules()  : mixed
add an list of rules can be - an array of rules - a string filename - an array of string filename
getRule()  : string
Get an existing named rule in order to override it
getRules()  : array<string|int, mixed>
get sorted Rules
loader()  : TextWheelRuleSet
public static loader can be overloaded to use memoization
findFile()  : string
file finder : can be overloaded in order to use application dependant path find method
loadFile()  : array<string|int, mixed>
Load a YAML/JSON file describing data
sort()  : mixed
Sort rules according to priority and purge disabled rules

Properties

Methods

__construct()

Constructor

public __construct([array<string|int, mixed>|string $ruleset = [] ][, string $filepath = '' ]) : mixed
Parameters
$ruleset : array<string|int, mixed>|string = []
$filepath : string = ''

addRule()

add a rule

public addRule(TextWheelRule $rule) : mixed
Parameters
$rule : TextWheelRule

addRules()

add an list of rules can be - an array of rules - a string filename - an array of string filename

public addRules(array<string|int, mixed>|string $rules[, string $filepath = '' ]) : mixed
Parameters
$rules : array<string|int, mixed>|string
$filepath : string = ''

getRule()

Get an existing named rule in order to override it

public & getRule(string $name) : string
Parameters
$name : string
Return values
string

getRules()

get sorted Rules

public & getRules() : array<string|int, mixed>
Return values
array<string|int, mixed>

loader()

public static loader can be overloaded to use memoization

public static & loader(array<string|int, mixed> $ruleset[, string $callback = '' ][, string $class = 'TextWheelRuleSet' ]) : TextWheelRuleSet
Parameters
$ruleset : array<string|int, mixed>
$callback : string = ''
$class : string = 'TextWheelRuleSet'
Return values
TextWheelRuleSet

findFile()

file finder : can be overloaded in order to use application dependant path find method

protected findFile(string &$file[, string $path = '' ]) : string
Parameters
$file : string
$path : string = ''
Return values
string

loadFile()

Load a YAML/JSON file describing data

protected loadFile(string &$file[, string $default_path = '' ]) : array<string|int, mixed>
Parameters
$file : string
$default_path : string = ''
Return values
array<string|int, mixed>

        
On this page

Search results