final class MetaFactory implements Stringable (View source)

Builds the HTML metadata block from ordered, replaceable metadata sections.

Methods

Initializes the standard metadata sections for the supplied page metadata.

addEntity(MetaEntityInterface $entity, int $priority = 0)

Adds or replaces a section at its rendering priority.

removeEntity(string $entityClassName)

Removes the first registered section of the supplied implementation class.

string
toHtml()

Renders all registered sections in ascending priority order.

string
string

Returns the rendered metadata HTML for string contexts.

string

Details

__construct

__construct(MetaData $data)

Initializes the standard metadata sections for the supplied page metadata.

Parameters

MetaData $data

addEntity

MetaFactory addEntity(MetaEntityInterface $entity, int $priority = 0)

Adds or replaces a section at its rendering priority.

Parameters

MetaEntityInterface $entity
int $priority

Return Value

MetaFactory

removeEntity

MetaFactory removeEntity(string $entityClassName)

Removes the first registered section of the supplied implementation class.

Parameters

string $entityClassName

Return Value

MetaFactory

toHtml

string toHtml()

Renders all registered sections in ascending priority order.

Return Value

string

__toString

string __toString()

Returns the rendered metadata HTML for string contexts.

Return Value

string