PHP Класс Calotype\SEO\Generators\MetaGenerator

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$canonical array The canonical url.
$defaults * The default configurations.
$description string The meta description.
$keywords string The meta keywords.
$max_description_length integer The maximal length of the meta description.
$title string The meta title.

Открытые методы

Метод Описание
__construct ( array $defaults = [] ) Create a new MetaGenerator instance.
fromObject ( Calotype\SEO\Contracts\MetaAware $object ) Use the meta data of a MetaAware object.
generate ( ) : string Render the meta tags.
getCanonical ( ) : string Get the canonical url.
getDefault ( string $default ) : mixed Get a default configuration.
getDescription ( ) : string Get the Meta description.
getKeywords ( ) : string Get the Meta keywords.
getTitle ( ) : string Get the Meta title.
reset ( ) : void Reset the title and description fields.
setCanonical ( string $url ) Set the canonical url.
setDescription ( string $description ) Set the Meta description.
setKeywords ( array | string $keywords ) Set the Meta keywords.
setTitle ( string $title ) Set the Meta title.

Описание методов

__construct() публичный Метод

Create a new MetaGenerator instance.
public __construct ( array $defaults = [] )
$defaults array

fromObject() публичный Метод

Use the meta data of a MetaAware object.
public fromObject ( Calotype\SEO\Contracts\MetaAware $object )
$object Calotype\SEO\Contracts\MetaAware

generate() публичный Метод

Render the meta tags.
public generate ( ) : string
Результат string

getCanonical() публичный Метод

Get the canonical url.
public getCanonical ( ) : string
Результат string

getDefault() публичный Метод

Get a default configuration.
public getDefault ( string $default ) : mixed
$default string
Результат mixed

getDescription() публичный Метод

Get the Meta description.
public getDescription ( ) : string
Результат string

getKeywords() публичный Метод

Get the Meta keywords.
public getKeywords ( ) : string
Результат string

getTitle() публичный Метод

Get the Meta title.
public getTitle ( ) : string
Результат string

reset() публичный Метод

Reset the title and description fields.
public reset ( ) : void
Результат void

setCanonical() публичный Метод

Set the canonical url.
public setCanonical ( string $url )
$url string

setDescription() публичный Метод

Set the Meta description.
public setDescription ( string $description )
$description string

setKeywords() публичный Метод

Set the Meta keywords.
public setKeywords ( array | string $keywords )
$keywords array | string

setTitle() публичный Метод

Set the Meta title.
public setTitle ( string $title )
$title string

Описание свойств

$canonical защищенное свойство

The canonical url.
protected array $canonical
Результат array

$defaults защищенное свойство

* The default configurations.
protected $defaults

$description защищенное свойство

The meta description.
protected string $description
Результат string

$keywords защищенное свойство

The meta keywords.
protected string $keywords
Результат string

$max_description_length защищенное свойство

The maximal length of the meta description.
protected int $max_description_length
Результат integer

$title защищенное свойство

The meta title.
protected string $title
Результат string