Documentation

ElementFactoryComponent implements IElementFactoryComponent

A configuration option for the ElementFactory, which provides a mapping from property type to element.

Essentially, for a specific type of IProperty, this will create an Element instance.

Table of Contents

$interface Property interface string
$elementSupplier Supplier for creating instances of Element. Closure
__construct() mixed
getInterface() Retrieve the property interface name. string
createElement() Create an element based on the defined property type. IElement

Properties

$elementSupplier

Supplier for creating instances of Element.

private Closure $elementSupplier
f( IProperty $prop, string $name, string $id, string $value ) : IElement

Methods

__construct()

public __construct( $interface : string , $elementSupplier : Closure ) : mixed
Parameters
$interface : string
$elementSupplier : Closure

Creates instances of IElement based on property interface. f() : IElement

Return values
mixed

getInterface()

Retrieve the property interface name.

public getInterface( ) : string

This is matched against instances of IProperty. If they match, then createElement() is called.

Return values
string

Search results