Skip to content

Kirby 4.1.2

Sane::validate()

Validates file contents with the specified handler

Sane::validate(string $string, string $type, bool $isExternal = false): void

Parameters

Name Type Default Description
$string * string
$type * string
$isExternal bool false Whether the string is from an external file
that may be accessed directly

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException If the file didn't pass validation
Kirby\Exception\NotFoundException If the handler was not found
Kirby\Exception\Exception On other errors

Parent class

Kirby\Sane\Sane