PHP Class Arcanedev\SeoHelper\Entities\Twitter\Card

Author: ARCANEDEV ([email protected])
Inheritance: implements Arcanedev\SeoHelper\Contracts\Entities\TwitterCardInterface, use trait Arcanedev\Support\Traits\Configurable
Afficher le fichier Open project: arcanedev/seo-helper

Protected Properties

Свойство Type Description
$images array Card images.
$metas Arcanedev\SeoHelper\Contracts\Entities\MetaCollection Card meta collection.
$type string Card type.

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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

__toString() public méthode

Render the tag.
public __toString ( ) : string
Résultat string

addImage() public méthode

Add image to the card.
public addImage ( string $url ) : Card
$url string
Résultat Card

addMeta() public méthode

Add a meta to the card.
public addMeta ( string $name, string $content ) : Card
$name string
$content string
Résultat Card

addMetas() public méthode

Add many metas to the card.
public addMetas ( array $metas ) : Card
$metas array
Résultat Card

render() public méthode

Render the twitter card.
public render ( ) : string
Résultat string

reset() public méthode

Reset the card.
public reset ( ) : Card
Résultat Card

setDescription() public méthode

Set card description.
public setDescription ( string $description ) : Card
$description string
Résultat Card

setSite() public méthode

Set card site.
public setSite ( string $site ) : Card
$site string
Résultat Card

setTitle() public méthode

Set card title.
public setTitle ( string $title ) : Card
$title string
Résultat Card

setType() public méthode

Set the card type.
public setType ( string $type ) : Card
$type string
Résultat Card

types() public méthode

Get all supported card types.
public types ( ) : array
Résultat array

Property Details

$images protected_oe property

Card images.
protected array $images
Résultat array

$metas protected_oe property

Card meta collection.
protected MetaCollection,Arcanedev\SeoHelper\Contracts\Entities $metas
Résultat Arcanedev\SeoHelper\Contracts\Entities\MetaCollection

$type protected_oe property

Card type.
protected string $type
Résultat string