Skip to content

Indenter

  • Full name: \Qubus\Support\Indenter
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Constants

Constant Visibility Type Value
ELEMENT_TYPE_BLOCK public 0
ELEMENT_TYPE_INLINE public 1
MATCH_INDENT_NO public 0
MATCH_INDENT_DECREASE public 1
MATCH_INDENT_INCREASE public 2
MATCH_DISCARD public 3

Properties

log

public array $log

options

private array $options

inlineElements

private array $inlineElements

ignoreElements

private array $ignoreElements

temporaryReplacementsScript

private array $temporaryReplacementsScript

temporaryReplacementsIgnore

private array $temporaryReplacementsIgnore

temporaryReplacementsInline

private array $temporaryReplacementsInline

Methods

__construct

public __construct(array $options = []): mixed

Parameters:

Parameter Type Description
$options array

Throws:


setElementType

public setElementType(string $elementName, \Qubus\Support\Indenter::ELEMENT_TYPE_BLOCK|\Qubus\Support\Indenter::ELEMENT_TYPE_INLINE $type): void

Parameters:

Parameter Type Description
$elementName string Element name, e.g. "b".
$type \Qubus\Support\Indenter::ELEMENT_TYPE_BLOCK|\Qubus\Support\Indenter::ELEMENT_TYPE_INLINE

Throws:


indent

public indent(string|null $input = null): string

Parameters:

Parameter Type Description
$input string|null HTML input.

Return Value:

Indented HTML.



Automatically generated on 2025-10-13