Documentation

ArrayFormatTrait

Table of Contents

Methods

loadArray()  : $this
Populate this field-spec using values from an array.
toArray()  : array<string|int, mixed>
Gets all public variables, converted to snake_case

Methods

loadArray()

Populate this field-spec using values from an array.

public loadArray(iterable<string|int, mixed> $values[, bool $strict = FALSE ]) : $this
Parameters
$values : iterable<string|int, mixed>

List of public variables, expressed in snake_case. Ex: ['title' => 'Color', 'default_value' => '#f00']

$strict : bool = FALSE

In strict mode, properties are only accepted if they are formally defined on the current class.

Return values
$this

toArray()

Gets all public variables, converted to snake_case

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

        
On this page

Search results