CodeIgniter v4.5 API

InvalidChars
in package
implements FilterInterface

InvalidChars filter.

Check if user input data ($_GET, $_POST, $_COOKIE, php://input) do not contain invalid characters:

  • invalid UTF-8 characters
  • control characters except line break and tab code
Tags
see
InvalidCharsTest

Table of Contents

Interfaces

FilterInterface
Filter interface

Properties

$controlCodeRegex  : string
Regular expressions for valid control codes
$source  : string
Data source

Methods

after()  : void
We don't have anything to do here.
before()  : void
Check invalid characters.
checkControl()  : array<string|int, mixed>|string
Check for the presence of control characters except line breaks and tabs.
checkEncoding()  : array<string|int, mixed>|string
Check the character encoding is valid UTF-8.

Properties

$controlCodeRegex

Regular expressions for valid control codes

protected string $controlCodeRegex = '/\A[\r\n\t[:^cntrl:]]*\z/u'

Methods

checkControl()

Check for the presence of control characters except line breaks and tabs.

protected checkControl(array<string|int, mixed>|string $value) : array<string|int, mixed>|string
Parameters
$value : array<string|int, mixed>|string
Return values
array<string|int, mixed>|string

checkEncoding()

Check the character encoding is valid UTF-8.

protected checkEncoding(array<string|int, mixed>|string $value) : array<string|int, mixed>|string
Parameters
$value : array<string|int, mixed>|string
Return values
array<string|int, mixed>|string

        
On this page

Search results