pageon/html-meta

Manage HTML meta tags in PHP

2.0.1 2017-05-25 14:14 UTC

This package is not auto-updated.

Last update: 2024-11-06 00:45:25 UTC


README

Build Status Scrutinizer Code Quality

Basic usages

$meta = new Meta();

$meta->charset('UTF-8');
$meta->name('title', 'Hello World');
$meta->httpEquiv('Expires', '5000');
$meta->link('next', 'http://lorem.ipsum/?page=3');

$meta->title('Title');
$meta->description('My Description');
$meta->image('/path/to/image.jpeg');

Using it as an injectable service

class MyService 
{
    public function __construct(Meta $meta) {
        $meta->image($this->image->getThumbnail());
    }
}

Rendering

$html = $meta->render();
{{ meta->render() }}