$regexes
$regexes :
__construct(\TriTan\Interfaces\Hooks\ActionFilterHookInterface $hook, $validate = array(), $required = array(), $sanitize = array())
\TriTan\Interfaces\Hooks\ActionFilterHookInterface | $hook | |
$validate | ||
$required | ||
$sanitize |
items(array $items, string $context = 'save') : array
Sanitizes an array of items according to the $this->sanitize[].
Sanitize will be standard of type string, but can also be specified. For ease of use, this syntax is accepted:
$sanitize = array('fieldname', 'otherfieldname' => 'float');
$this->items($sanitize);
array | $items | Items to sanitize. |
string | $context | The context for which the string is being sanitized. |
Sanitized items.
item(mixed $item, string $type = 'string', string $context = 'save') : string|null
Sanitizes an item according to type.
mixed | $item | Item to sanitize. |
string | $type | Item type (i.e. string, float, int, etc.). |
string | $context | The context for which the string is being sanitized. |
Sanitized string or null if item is empty.
username(string $username, boolean $strict = false) : string
Sanitizes a username, stripping out unsafe characters.
Removes tags, octets, entities, and if strict is enabled, will only keep
alphanumeric, _, space, ., -, @. After sanitizing, it passes the username,
raw username (the username in the parameter), and the value of $strict as
parameters for the sanitize_user
filter.
string | $username | The username to be sanitized. |
boolean | $strict | If set, limits $username to specific characters. Default false. |
The sanitized username, after passing through filters.