Documentation

FlexInterface extends Countable

Interface FlexInterface

Table of Contents

Methods

addDirectory()  : $this
addDirectoryType()  : $this
count()  : int
getCollection()  : FlexCollectionInterface|null
getDirectories()  : array<string|int, FlexDirectory|null>
getDirectory()  : FlexDirectory|null
getMixedCollection()  : FlexCollectionInterface
getObject()  : FlexObjectInterface|null
getObjects()  : array<string|int, mixed>
hasDirectory()  : bool

Methods

addDirectoryType()

public addDirectoryType(string $type, string $blueprint[, array<string|int, mixed> $config = [] ]) : $this
Parameters
$type : string
$blueprint : string
$config : array<string|int, mixed> = []
Return values
$this

getCollection()

public getCollection(string $type[, array<string|int, mixed>|null $keys = null ][, string|null $keyField = null ]) : FlexCollectionInterface|null
Parameters
$type : string
$keys : array<string|int, mixed>|null = null
$keyField : string|null = null
Tags
phpstan-return

FlexCollectionInterface<FlexObjectInterface>|null

Return values
FlexCollectionInterface|null

getDirectories()

public getDirectories([array<string|int, mixed>|array<string|int, string>|null $types = null ][, bool $keepMissing = false ]) : array<string|int, FlexDirectory|null>
Parameters
$types : array<string|int, mixed>|array<string|int, string>|null = null
$keepMissing : bool = false
Return values
array<string|int, FlexDirectory|null>

getMixedCollection()

public getMixedCollection(array<string|int, mixed> $keys[, array<string|int, mixed> $options = [] ]) : FlexCollectionInterface
Parameters
$keys : array<string|int, mixed>
$options : array<string|int, mixed> = []

In addition to the options in getObjects(), following options can be passed: collection_class: Class to be used to create the collection. Defaults to ObjectCollection.

Tags
throws
RuntimeException
phpstan-return

FlexCollectionInterface<FlexObjectInterface>

Return values
FlexCollectionInterface

getObject()

public getObject(string $key[, string|null $type = null ][, string|null $keyField = null ]) : FlexObjectInterface|null
Parameters
$key : string
$type : string|null = null
$keyField : string|null = null
Return values
FlexObjectInterface|null

getObjects()

public getObjects(array<string|int, mixed> $keys[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$keys : array<string|int, mixed>
$options : array<string|int, mixed> = []

Following optional options can be passed: types: List of allowed types. type: Allowed type if types isn't defined, otherwise acts as default_type. default_type: Set default type for objects given without type (only used if key_field isn't set). keep_missing: Set to true if you want to return missing objects as null. key_field: Key field which is used to match the objects.

Return values
array<string|int, mixed>

hasDirectory()

public hasDirectory(string $type) : bool
Parameters
$type : string
Return values
bool

        
On this page

Search results