Documentation

XmlScanner

Table of Contents

$callback  : mixed
$libxmlDisableEntityLoaderValue  : mixed
$pattern  : string
String used to identify risky xml elements.
$shutdownRegistered  : bool
__construct()  : mixed
__destruct()  : mixed
getInstance()  : mixed
scan()  : string
Scan the XML for use of <!ENTITY to prevent XXE/XEE attacks.
scanFile()  : string
Scan theXML for use of <!ENTITY to prevent XXE/XEE attacks.
setAdditionalCallback()  : void
shutdown()  : void
threadSafeLibxmlDisableEntityLoaderAvailability()  : mixed
disableEntityLoaderCheck()  : void
forceString()  : string
toUtf8()  : string

Properties

$libxmlDisableEntityLoaderValue

private static mixed $libxmlDisableEntityLoaderValue

$pattern

String used to identify risky xml elements.

private string $pattern

$shutdownRegistered

private static bool $shutdownRegistered = false

Methods

__construct()

public __construct([mixed $pattern = '<!DOCTYPE' ]) : mixed
Parameters
$pattern : mixed = '<!DOCTYPE'
Return values
mixed

__destruct()

public __destruct() : mixed
Return values
mixed

getInstance()

public static getInstance(IReader $reader) : mixed
Parameters
$reader : IReader
Return values
mixed

scan()

Scan the XML for use of <!ENTITY to prevent XXE/XEE attacks.

public scan(false|string $xml) : string
Parameters
$xml : false|string
Return values
string

scanFile()

Scan theXML for use of <!ENTITY to prevent XXE/XEE attacks.

public scanFile(string $filestream) : string
Parameters
$filestream : string
Return values
string

setAdditionalCallback()

public setAdditionalCallback(callable $callback) : void
Parameters
$callback : callable
Return values
void

shutdown()

public static shutdown() : void
Return values
void

threadSafeLibxmlDisableEntityLoaderAvailability()

public static threadSafeLibxmlDisableEntityLoaderAvailability() : mixed
Return values
mixed

disableEntityLoaderCheck()

private disableEntityLoaderCheck() : void
Return values
void

forceString()

private static forceString(mixed $arg) : string
Parameters
$arg : mixed
Return values
string

toUtf8()

private toUtf8(string $xml) : string
Parameters
$xml : string
Return values
string

Search results