Documentation

CollectionFactory
in package

Table of Contents

Methods

createDeepAppList()  : AppList
createDeepAppObject()  : AppObject<string|int, mixed>
fromJson()  : array<string, mixed>
Parse the given JSON file as an associative array.

Methods

createDeepAppList()

public static createDeepAppList(array<int, mixed> $list) : AppList
Parameters
$list : array<int, mixed>
Return values
AppList

createDeepAppObject()

public static createDeepAppObject(array<string, mixed> $arrayEntity) : AppObject<string|int, mixed>
Parameters
$arrayEntity : array<string, mixed>
Tags
todo

Delete this method, make AppObject (and AppList) handle it, this would result in less imports (CollectionFactory), more predictable (AppObjects and AppArrays never store arrays), stronger typing (null|scalar|object instead of mixed).

Return values
AppObject<string|int, mixed>

fromJson()

Parse the given JSON file as an associative array.

public static fromJson(string $filePath) : array<string, mixed>
Parameters
$filePath : string

Path to the JSON file.

Tags
todo

Return AppObject instead?

Wait for PHPStan to fix issue and remove ignore of return.type.

Return values
array<string, mixed>
On this page

Search results