class IpportFilter extends AttributeFilter

Traits

Properties

protected callable $callback from  ProgrammableCallback
protected string $js from  ProgrammableCallback
protected array $params from  ProgrammableCallback
protected array $vars from  ProgrammableCallback
protected array $markedSafe from  TemplateSafeness

Methods

__construct()

Constructor

addParameterByValue(mixed $paramValue)

Add a parameter by value

addParameterByName(string $paramName)

Add a parameter by name

callable
getCallback()

Get this object's callback

string
getJS()

Get this callback's JavaScript

array
getVars()

Get this object's variables

resetParameters()

Remove all the parameters

setJS(string $js)

Set this callback's JavaScript

setVar(string $name, string $value)

Set or overwrite one of this callback's variable

setVars(array $vars)

Set all of this callback's variables at once

array|Dictionary|null
asConfig()

Return an array-based representation of this object to be used for parsing

void
autoloadJS()

Try to load the JavaScript source for this callback

callable
normalizeCallback(callable $callback)

Normalize a callback's representation

bool
isSafe(string $context)

Return whether this object is safe to be used in given context

bool
isSafeAsURL()

Return whether this object is safe to be used as a URL

bool
isSafeInCSS()

Return whether this object is safe to be used in CSS

bool
isSafeInJS()

Return whether this object is safe to be used in JavaScript

markAsSafeAsURL()

Return whether this object is safe to be used as a URL

markAsSafeInCSS()

Return whether this object is safe to be used in CSS

markAsSafeInJS()

Return whether this object is safe to be used in JavaScript

resetSafeness()

Reset the "marked safe" statuses

Details

at line 17
__construct()

Constructor

ProgrammableCallback addParameterByValue(mixed $paramValue)

Add a parameter by value

Parameters

mixed $paramValue

Return Value

ProgrammableCallback

ProgrammableCallback addParameterByName(string $paramName)

Add a parameter by name

The value will be dynamically generated by the caller

Parameters

string $paramName

Return Value

ProgrammableCallback

callable getCallback()

Get this object's callback

Return Value

callable

in ProgrammableCallback at line 100
string getJS()

Get this callback's JavaScript

Return Value

string

in ProgrammableCallback at line 110
array getVars()

Get this object's variables

Return Value

array

in ProgrammableCallback at line 120
ProgrammableCallback resetParameters()

Remove all the parameters

Return Value

ProgrammableCallback

in ProgrammableCallback at line 133
ProgrammableCallback setJS(string $js)

Set this callback's JavaScript

Parameters

string $js

JavaScript source code for this callback

Return Value

ProgrammableCallback

in ProgrammableCallback at line 147
ProgrammableCallback setVar(string $name, string $value)

Set or overwrite one of this callback's variable

Parameters

string $name

Variable name

string $value

Variable value

Return Value

ProgrammableCallback

in ProgrammableCallback at line 160
ProgrammableCallback setVars(array $vars)

Set all of this callback's variables at once

Parameters

array $vars

Associative array of values

Return Value

ProgrammableCallback

in ProgrammableCallback at line 170
array|Dictionary|null asConfig()

Return an array-based representation of this object to be used for parsing

NOTE: if this method was named getConfig() it could interfere with magic getters from the Configurable trait

Return Value

array|Dictionary|null

in ProgrammableCallback at line 209
protected void autoloadJS()

Try to load the JavaScript source for this callback

Return Value

void

in ProgrammableCallback at line 232
protected callable normalizeCallback(callable $callback)

Normalize a callback's representation

Parameters

callable $callback

Return Value

callable

in TemplateSafeness at line 23
protected bool isSafe(string $context)

Return whether this object is safe to be used in given context

Parameters

string $context

Either 'AsURL', 'InCSS' or 'InJS'

Return Value

bool

in TemplateSafeness at line 34
bool isSafeAsURL()

Return whether this object is safe to be used as a URL

Return Value

bool

in TemplateSafeness at line 44
bool isSafeInCSS()

Return whether this object is safe to be used in CSS

Return Value

bool

in TemplateSafeness at line 54
bool isSafeInJS()

Return whether this object is safe to be used in JavaScript

Return Value

bool

in TemplateSafeness at line 64
TemplateSafeness markAsSafeAsURL()

Return whether this object is safe to be used as a URL

Return Value

TemplateSafeness

in TemplateSafeness at line 76
TemplateSafeness markAsSafeInCSS()

Return whether this object is safe to be used in CSS

Return Value

TemplateSafeness

in TemplateSafeness at line 88
TemplateSafeness markAsSafeInJS()

Return whether this object is safe to be used in JavaScript

Return Value

TemplateSafeness

in TemplateSafeness at line 100
TemplateSafeness resetSafeness()

Reset the "marked safe" statuses

Return Value

TemplateSafeness