Meta
in package
Helpers to fluently declare HTML meta elements using their object representations.
Table of Contents
Methods
- get() : GlobalMetadataBag
- Get the global metadata bag.
- link() : LinkElement
- Create a new <link> element class with the given rel and href.
- name() : MetadataElement
- Create a new <meta> element class with the given name and content.
- property() : OpenGraphElement
- Create a new <meta> element class with the given OpenGraph property and content.
- render() : string
- Render the global metadata bag.
Methods
get()
Get the global metadata bag.
public
static get() : GlobalMetadataBag
Return values
GlobalMetadataBaglink()
Create a new <link> element class with the given rel and href.
public
static link(string $rel, string $href[, array<string|int, mixed> $attr = [] ]) : LinkElement
Parameters
- $rel : string
-
The link tag's rel attribute.
- $href : string
-
The link tag's href attribute.
- $attr : array<string|int, mixed> = []
-
An optional key-value array of additional attributes.
Tags
Return values
LinkElementname()
Create a new <meta> element class with the given name and content.
public
static name(string $name, string $content) : MetadataElement
Parameters
- $name : string
-
The meta tag's name attribute.
- $content : string
-
The content of the meta tag.
Tags
Return values
MetadataElementproperty()
Create a new <meta> element class with the given OpenGraph property and content.
public
static property(string $property, string $content) : OpenGraphElement
Parameters
- $property : string
-
The meta tag's property attribute. The "og:" prefix is optional.
- $content : string
-
The content of the meta tag.
Tags
Return values
OpenGraphElementrender()
Render the global metadata bag.
public
static render() : string