Documentation du code de SPIP et de ses plugins

TextWheel pour SPIP

SPIPTextWheelRuleset extends TextWheelRuleSet
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()  : SPIPTextWheelRuleset
public static loader can be overloaded to use memoization
findFile()  : mixed
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(mixed $ruleset[, mixed $callback = '' ][, mixed $class = 'SPIPTextWheelRuleset' ]) : SPIPTextWheelRuleset
Parameters
$ruleset : mixed
$callback : mixed = ''
$class : mixed = 'SPIPTextWheelRuleset'
Return values
SPIPTextWheelRuleset

findFile()

protected findFile(mixed &$file[, mixed $path = '' ]) : mixed
Parameters
$file : mixed
$path : mixed = ''

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