PHP Interface Artesaos\SEOTools\Contracts\OpenGraph

显示文件 Open project: artesaos/seotools

Public Methods

Method Description
__construct ( array $config = [] )
addAudio ( string $source = null, array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph add audio properties.
addImage ( string $url, array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Add image to properties.
addImages ( array $urls ) : Artesaos\SEOTools\Contracts\OpenGraph Add images to properties.
addProperty ( string $key, string | array $value ) : Artesaos\SEOTools\Contracts\OpenGraph Add or update property.
addVideo ( string $source = null, array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph add Video properties.
generate ( boolean $minify = false ) : string Generates open graph tags.
removeProperty ( string $key ) : Artesaos\SEOTools\Contracts\OpenGraph Remove property.
setArticle ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Article properties.
setBook ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Book properties.
setDescription ( string $description ) : Artesaos\SEOTools\Contracts\OpenGraph Define description property.
setMusicAlbum ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Music Album properties.
setMusicPlaylist ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Music Playlist properties.
setMusicRadioStation ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Music RadioStation properties.
setMusicSong ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Music Song properties.
setProfile ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Profile properties.
setSiteName ( string $name ) : Artesaos\SEOTools\Contracts\OpenGraph Define site_name property.
setTitle ( $title ) : Artesaos\SEOTools\Contracts\OpenGraph Define title property.
setType ( $type = null ) : Artesaos\SEOTools\Contracts\OpenGraph Define type property.
setUrl ( string $url ) : Artesaos\SEOTools\Contracts\OpenGraph Define url property.
setVideoEpisode ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Video Episode properties.
setVideoMovie ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Video Movie properties.
setVideoOther ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Video Episode properties.
setVideoTVShow ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph Set Video Episode properties.

Method Details

__construct() public method

public __construct ( array $config = [] )
$config array

addAudio() public method

add audio properties.
public addAudio ( string $source = null, array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$source string
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

addImage() public method

Add image to properties.
public addImage ( string $url, array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$url string
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

addImages() public method

Add images to properties.
public addImages ( array $urls ) : Artesaos\SEOTools\Contracts\OpenGraph
$urls array
return Artesaos\SEOTools\Contracts\OpenGraph

addProperty() public method

Add or update property.
public addProperty ( string $key, string | array $value ) : Artesaos\SEOTools\Contracts\OpenGraph
$key string
$value string | array
return Artesaos\SEOTools\Contracts\OpenGraph

addVideo() public method

add Video properties.
public addVideo ( string $source = null, array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$source string
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

generate() public method

Generates open graph tags.
public generate ( boolean $minify = false ) : string
$minify boolean
return string

removeProperty() public method

Remove property.
public removeProperty ( string $key ) : Artesaos\SEOTools\Contracts\OpenGraph
$key string
return Artesaos\SEOTools\Contracts\OpenGraph

setArticle() public method

Set Article properties.
public setArticle ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setBook() public method

Set Book properties.
public setBook ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setDescription() public method

Define description property.
public setDescription ( string $description ) : Artesaos\SEOTools\Contracts\OpenGraph
$description string
return Artesaos\SEOTools\Contracts\OpenGraph

setMusicAlbum() public method

Set Music Album properties.
public setMusicAlbum ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setMusicPlaylist() public method

Set Music Playlist properties.
public setMusicPlaylist ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setMusicRadioStation() public method

Set Music RadioStation properties.
public setMusicRadioStation ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setMusicSong() public method

Set Music Song properties.
public setMusicSong ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setProfile() public method

Set Profile properties.
public setProfile ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setSiteName() public method

Define site_name property.
public setSiteName ( string $name ) : Artesaos\SEOTools\Contracts\OpenGraph
$name string
return Artesaos\SEOTools\Contracts\OpenGraph

setTitle() public method

Define title property.
public setTitle ( $title ) : Artesaos\SEOTools\Contracts\OpenGraph
$title
return Artesaos\SEOTools\Contracts\OpenGraph

setType() public method

Define type property.
public setType ( $type = null ) : Artesaos\SEOTools\Contracts\OpenGraph
return Artesaos\SEOTools\Contracts\OpenGraph

setUrl() public method

Define url property.
public setUrl ( string $url ) : Artesaos\SEOTools\Contracts\OpenGraph
$url string
return Artesaos\SEOTools\Contracts\OpenGraph

setVideoEpisode() public method

Set Video Episode properties.
public setVideoEpisode ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setVideoMovie() public method

Set Video Movie properties.
public setVideoMovie ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setVideoOther() public method

Set Video Episode properties.
public setVideoOther ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph

setVideoTVShow() public method

Set Video Episode properties.
public setVideoTVShow ( array $attributes = [] ) : Artesaos\SEOTools\Contracts\OpenGraph
$attributes array
return Artesaos\SEOTools\Contracts\OpenGraph