Documentation

YamlFormatter extends AbstractFormatter

Class YamlFormatter

Table of Contents

Methods

__construct()  : mixed
YamlFormatter constructor.
__serialize()  : array<string|int, mixed>
__unserialize()  : void
decode()  : mixed
Decode a string into data.
encode()  : string
Encode data into a string.
getDefaultFileExtension()  : string
Get default file extension from current formatter (with dot).
getIndentOption()  : int
getInlineOption()  : int
getMimeType()  : string
getSupportedFileExtensions()  : array<string|int, string>
Get file extensions supported by current formatter (with dot).
serialize()  : string
unserialize()  : void
useCompatibleDecoder()  : bool
useNativeDecoder()  : bool
getConfig()  : mixed
Get either full configuration or a single option.
getUnserializeAllowedClasses()  : array<string|int, mixed>|bool

Methods

__construct()

YamlFormatter constructor.

public __construct([array<string|int, mixed> $config = [] ]) : mixed
Parameters
$config : array<string|int, mixed> = []

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

encode()

Encode data into a string.

public encode(array<string|int, mixed> $data[, int|null $inline = null ][, int|null $indent = null ]) : string
Parameters
$data : array<string|int, mixed>
$inline : int|null = null
$indent : int|null = null
Tags
see
FileFormatterInterface::encode()
Return values
string

getIndentOption()

public getIndentOption() : int
Return values
int

getInlineOption()

public getInlineOption() : int
Return values
int

serialize()

public final serialize() : string
Return values
string

unserialize()

public final unserialize(string $serialized) : void
Parameters
$serialized : string

useCompatibleDecoder()

public useCompatibleDecoder() : bool
Return values
bool

useNativeDecoder()

public useNativeDecoder() : bool
Return values
bool

getConfig()

Get either full configuration or a single option.

protected getConfig([string|null $name = null ]) : mixed
Parameters
$name : string|null = null

Configuration option (optional)

getUnserializeAllowedClasses()

protected getUnserializeAllowedClasses() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool

        
On this page

Search results