WooCommerce Code Reference

OutputFormat
in package

Extending this class is deprecated in version 8.8.0; it will be made `final` in version 9.0.0.

Table of Contents

$iIndentationLevel  : int
$oFormatter  : OutputFormatter|null
$oNextLevelFormat  : OutputFormat|null
__call()  : mixed
beLenient()  : void
create()  : self
Creates an instance of this class without any particular formatting settings.
createCompact()  : self
Creates an instance of this class with a preset for compact formatting.
createPretty()  : self
Creates an instance of this class with a preset for pretty formatting.
get()  : string|null
indentWithSpaces()  : self
indentWithTabs()  : self
level()  : int
set()  : self|false
setSemicolonAfterLastRule()  :

Properties

Methods

__call()

public __call(string $sMethodName, array<array-key, mixed> $aArguments) : mixed
Parameters
$sMethodName : string
$aArguments : array<array-key, mixed>
Tags
throws
Exception
Return values
mixed

get()

public get(string $sName) : string|null
Parameters
$sName : string
Tags
deprecated

since 8.8.0, will be removed in 9.0.0. Use specific getters instead.

Return values
string|null

set()

public set(array<array-key, string>|string $aNames, mixed $mValue) : self|false
Parameters
$aNames : array<array-key, string>|string
$mValue : mixed
Tags
deprecated

since 8.8.0, will be removed in 9.0.0. Use specific setters instead.

Return values
self|false

setSemicolonAfterLastRule()

public setSemicolonAfterLastRule(bool $bSemicolonAfterLastRule) :

Set whether semicolons are added after last rule.

Parameters
$bSemicolonAfterLastRule : bool
Return values