PHP Класс Arcanedev\SeoHelper\Entities\Twitter\Card

Автор: ARCANEDEV ([email protected])
Наследование: implements Arcanedev\SeoHelper\Contracts\Entities\TwitterCardInterface, use trait Arcanedev\Support\Traits\Configurable
Показать файл Открыть проект

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

Свойство Тип Описание
$images array Card images.
$metas Arcanedev\SeoHelper\Contracts\Entities\MetaCollection Card meta collection.
$type string Card type.

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

Метод Описание
__construct ( array $configs = [] ) Make the twitter card instance.
__toString ( ) : string Render the tag.
addImage ( string $url ) : Card Add image to the card.
addMeta ( string $name, string $content ) : Card Add a meta to the card.
addMetas ( array $metas ) : Card Add many metas to the card.
render ( ) : string Render the twitter card.
reset ( ) : Card Reset the card.
setDescription ( string $description ) : Card Set card description.
setSite ( string $site ) : Card Set card site.
setTitle ( string $title ) : Card Set card title.
setType ( string $type ) : Card Set the card type.
types ( ) : array Get all supported card types.

Приватные методы

Метод Описание
checkSite ( string &$site ) Check the card site.
checkType ( string &$type ) Check the card type.
init ( ) : Card Start the engine.
loadImages ( ) Render card images.
prepareUsername ( string $username ) : string Prepare username.
setPrefix ( string $prefix ) : Card Set meta prefix name.

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

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

Make the twitter card instance.
public __construct ( array $configs = [] )
$configs array

__toString() публичный метод

Render the tag.
public __toString ( ) : string
Результат string

addImage() публичный метод

Add image to the card.
public addImage ( string $url ) : Card
$url string
Результат Card

addMeta() публичный метод

Add a meta to the card.
public addMeta ( string $name, string $content ) : Card
$name string
$content string
Результат Card

addMetas() публичный метод

Add many metas to the card.
public addMetas ( array $metas ) : Card
$metas array
Результат Card

render() публичный метод

Render the twitter card.
public render ( ) : string
Результат string

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

Reset the card.
public reset ( ) : Card
Результат Card

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

Set card description.
public setDescription ( string $description ) : Card
$description string
Результат Card

setSite() публичный метод

Set card site.
public setSite ( string $site ) : Card
$site string
Результат Card

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

Set card title.
public setTitle ( string $title ) : Card
$title string
Результат Card

setType() публичный метод

Set the card type.
public setType ( string $type ) : Card
$type string
Результат Card

types() публичный метод

Get all supported card types.
public types ( ) : array
Результат array

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

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

Card images.
protected array $images
Результат array

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

Card meta collection.
protected MetaCollection,Arcanedev\SeoHelper\Contracts\Entities $metas
Результат Arcanedev\SeoHelper\Contracts\Entities\MetaCollection

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

Card type.
protected string $type
Результат string