Helper
in package
Table of Contents
Properties
- $cacheDir : string
- キャッシュディレクトリのパス
- $htmlPurifier : HTMLPurifier
- HTMLPurifierのインスタンス
Methods
- __construct() : mixed
- clean() : string
- HTMLをクリーンアップする
- clearCache() : void
- HTMLPurifierのキャッシュをクリアする
- codeEscape() : string
- HTMLの<pre><code>内のコードをエスケープする
- loadPurifier() : HTMLPurifier
- HTMLPurifierのインスタンスをロードする
Properties
$cacheDir
キャッシュディレクトリのパス
protected
string
$cacheDir
= ''
$htmlPurifier
HTMLPurifierのインスタンス
protected
HTMLPurifier
$htmlPurifier
Methods
__construct()
public
__construct() : mixed
clean()
HTMLをクリーンアップする
public
clean(string|array<string|int, mixed> $html) : string
Parameters
- $html : string|array<string|int, mixed>
Return values
stringclearCache()
HTMLPurifierのキャッシュをクリアする
public
clearCache() : void
codeEscape()
HTMLの<pre><code>内のコードをエスケープする
protected
codeEscape(string $html) : string
Parameters
- $html : string
Return values
stringloadPurifier()
HTMLPurifierのインスタンスをロードする
protected
loadPurifier([array<string|int, mixed> $notAllowedTags = ['script', 'iframe', 'form'] ]) : HTMLPurifier
Parameters
- $notAllowedTags : array<string|int, mixed> = ['script', 'iframe', 'form']