MetaFactory
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.
Adds or replaces a section at its rendering priority.
Removes the first registered section of the supplied implementation class.
Renders all registered sections in ascending priority order.
Returns the rendered metadata HTML for string contexts.
Details
__construct
__construct(MetaData $data)
Initializes the standard metadata sections for the supplied page metadata.
addEntity
MetaFactory
addEntity(MetaEntityInterface $entity, int $priority = 0)
Adds or replaces a section at its rendering priority.
removeEntity
MetaFactory
removeEntity(string $entityClassName)
Removes the first registered section of the supplied implementation class.
toHtml
string
toHtml()
Renders all registered sections in ascending priority order.
__toString
string
__toString()
Returns the rendered metadata HTML for string contexts.