Sanitize
in package
Table of Contents
- $code : mixed
- $color : mixed
- $settings : mixed
- __construct() : mixed
- cmdSanitize() : string
- Remove query param "c" from url.
- colorNameSanitize() : string
- Sanitize color name of player.
- fullSanitize() : string
- Full sanitize a string, removed color and codes.
- htmlSanitize() : string
- Sanitize html.
- logdnetSanitize() : string
- Sanitize description of server in LoGDNet.
- mbSanitize() : string
- Sanitize a string to ve valid mb encoding.
- moduleNameSanitize() : string
- Module file names can only contain alpha numeric characters and underscores.
- nameSanitize() : string
- Sanitize name of player.
- newLineSanitize() : string
- Remove new line code from string.
- noLotgdCodes() : string
- Remove all codes that not are suported.
- preventLotgdCodes() : string
- Prevent for use LoTGD codes like colors and italic, bold.
- slugify() : string
- Converts a string into a slug.
- unColorize() : string
- Remove all colors code from string.
Properties
$code
protected
mixed
$code
$color
protected
mixed
$color
$settings
private
mixed
$settings
Methods
__construct()
public
__construct(Color $color, Code $code, Settings $settings) : mixed
Parameters
Return values
mixed —cmdSanitize()
Remove query param "c" from url.
public
cmdSanitize(string $string) : string
Parameters
- $string : string
-
Is a valid URL
Return values
string —colorNameSanitize()
Sanitize color name of player.
public
colorNameSanitize(int $spaceallowed, string $string[, bool $admin = null ]) : string
Handle spaces and color in character names.
Parameters
- $spaceallowed : int
- $string : string
- $admin : bool = null
Return values
string —fullSanitize()
Full sanitize a string, removed color and codes.
public
fullSanitize(string $string) : string
All LoTGD codes included (i
b `c) and others.
Parameters
- $string : string
Return values
string —htmlSanitize()
Sanitize html.
public
htmlSanitize(string $string) : string
Parameters
- $string : string
Return values
string —logdnetSanitize()
Sanitize description of server in LoGDNet.
public
logdnetSanitize(string $string) : string
Parameters
- $string : string
Return values
string —mbSanitize()
Sanitize a string to ve valid mb encoding.
public
mbSanitize(string $string) : string
Parameters
- $string : string
Return values
string —moduleNameSanitize()
Module file names can only contain alpha numeric characters and underscores.
public
moduleNameSanitize(string $string) : string
Parameters
- $string : string
Return values
string —nameSanitize()
Sanitize name of player.
public
nameSanitize(int $spaceAllowed, string $name) : string
Parameters
- $spaceAllowed : int
- $name : string
Return values
string —newLineSanitize()
Remove new line code from string.
public
newLineSanitize(string $string) : string
Parameters
- $string : string
Return values
string —noLotgdCodes()
Remove all codes that not are suported.
public
noLotgdCodes(string $string) : string
Parameters
- $string : string
Return values
string —preventLotgdCodes()
Prevent for use LoTGD codes like colors and italic, bold.
public
preventLotgdCodes(string $string) : string
..
Parameters
- $string : string
Return values
string —slugify()
Converts a string into a slug.
public
slugify(string $string) : string
Parameters
- $string : string
Return values
string —unColorize()
Remove all colors code from string.
public
unColorize(string $string) : string
ONLY colors, not include italic, bold... (i
b).
Parameters
- $string : string