PHP Class Arcanedev\SeoHelper\SeoOpenGraph

Author: ARCANEDEV ([email protected])
Inheritance: implements Arcanedev\SeoHelper\Contracts\SeoOpenGraph, use trait Arcanedev\Support\Traits\Configurable
显示文件 Open project: arcanedev/seo-helper

Protected Properties

Property Type Description
$enabled boolean Enable or Disable the OpenGraph.
$openGraph Arcanedev\SeoHelper\Contracts\Entities\OpenGraph The Open Graph instance.

Public Methods

Method Description
__construct ( array $configs ) Make SeoOpenGraph instance.
__toString ( ) : string Render the tag.
addProperties ( array $properties ) : SeoOpenGraph Add many open graph properties.
addProperty ( string $property, string $content ) : SeoOpenGraph Add an open graph property.
disable ( ) : SeoOpenGraph Disable the OpenGraph.
enable ( ) : SeoOpenGraph Enable the OpenGraph.
isDisabled ( ) : boolean Check if the OpenGraph is disabled.
isEnabled ( ) : boolean Check if the OpenGraph is enabled.
render ( ) : string Render the tag.
setDescription ( string $description ) : SeoOpenGraph Set description property.
setImage ( string $image ) : SeoOpenGraph Set image property.
setOpenGraph ( Arcanedev\SeoHelper\Contracts\Entities\OpenGraph $openGraph ) : SeoOpenGraph Set the Open Graph instance.
setPrefix ( string $prefix ) : SeoOpenGraph Set the open graph prefix.
setSiteName ( string $siteName ) : SeoOpenGraph Set site name property.
setTitle ( string $title ) : SeoOpenGraph Set title property.
setType ( string $type ) : SeoOpenGraph Set type property.
setUrl ( string $url ) : SeoOpenGraph Set url property.

Private Methods

Method Description
setEnabled ( boolean $enabled ) : SeoOpenGraph Set the enabled status for the OpenGraph.

Method Details

__construct() public method

Make SeoOpenGraph instance.
public __construct ( array $configs )
$configs array

__toString() public method

Render the tag.
public __toString ( ) : string
return string

addProperties() public method

Add many open graph properties.
public addProperties ( array $properties ) : SeoOpenGraph
$properties array
return SeoOpenGraph

addProperty() public method

Add an open graph property.
public addProperty ( string $property, string $content ) : SeoOpenGraph
$property string
$content string
return SeoOpenGraph

disable() public method

Disable the OpenGraph.
public disable ( ) : SeoOpenGraph
return SeoOpenGraph

enable() public method

Enable the OpenGraph.
public enable ( ) : SeoOpenGraph
return SeoOpenGraph

isDisabled() public method

Check if the OpenGraph is disabled.
public isDisabled ( ) : boolean
return boolean

isEnabled() public method

Check if the OpenGraph is enabled.
public isEnabled ( ) : boolean
return boolean

render() public method

Render the tag.
public render ( ) : string
return string

setDescription() public method

Set description property.
public setDescription ( string $description ) : SeoOpenGraph
$description string
return SeoOpenGraph

setImage() public method

Set image property.
public setImage ( string $image ) : SeoOpenGraph
$image string
return SeoOpenGraph

setOpenGraph() public method

Set the Open Graph instance.
public setOpenGraph ( Arcanedev\SeoHelper\Contracts\Entities\OpenGraph $openGraph ) : SeoOpenGraph
$openGraph Arcanedev\SeoHelper\Contracts\Entities\OpenGraph
return SeoOpenGraph

setPrefix() public method

Set the open graph prefix.
public setPrefix ( string $prefix ) : SeoOpenGraph
$prefix string
return SeoOpenGraph

setSiteName() public method

Set site name property.
public setSiteName ( string $siteName ) : SeoOpenGraph
$siteName string
return SeoOpenGraph

setTitle() public method

Set title property.
public setTitle ( string $title ) : SeoOpenGraph
$title string
return SeoOpenGraph

setType() public method

Set type property.
public setType ( string $type ) : SeoOpenGraph
$type string
return SeoOpenGraph

setUrl() public method

Set url property.
public setUrl ( string $url ) : SeoOpenGraph
$url string
return SeoOpenGraph

Property Details

$enabled protected_oe property

Enable or Disable the OpenGraph.
protected bool $enabled
return boolean

$openGraph protected_oe property

The Open Graph instance.
protected OpenGraph,Arcanedev\SeoHelper\Contracts\Entities $openGraph
return Arcanedev\SeoHelper\Contracts\Entities\OpenGraph