PHP Class Arcanedev\SeoHelper\Entities\OpenGraph\Graph

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

Protected Properties

Property Type Description
$metas Arcanedev\SeoHelper\Contracts\Entities\MetaCollection The Open Graph meta collection.

Public Methods

Method Description
__construct ( array $configs = [] ) Make Graph instance.
__toString ( ) : string Render the tag.
addProperties ( array $properties ) : Graph Add many open graph properties.
addProperty ( string $property, string $content ) : Graph Add an open graph property.
render ( ) : string Render the tag.
setDescription ( string $description ) : Graph Set description property.
setImage ( string $image ) : Graph Set image property.
setPrefix ( string $prefix ) : Graph Set the open graph prefix.
setSiteName ( string $siteName ) : Graph Set site name property.
setTitle ( string $title ) : Graph Set title property.
setType ( string $type ) : Graph Set type property.
setUrl ( string $url ) : Graph Set url property.

Private Methods

Method Description
init ( ) Start the engine.

Method Details

__construct() public method

Make Graph 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 ) : Graph
$properties array
return Graph

addProperty() public method

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

render() public method

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

setDescription() public method

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

setImage() public method

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

setPrefix() public method

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

setSiteName() public method

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

setTitle() public method

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

setType() public method

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

setUrl() public method

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

Property Details

$metas protected property

The Open Graph meta collection.
protected MetaCollection,Arcanedev\SeoHelper\Contracts\Entities $metas
return Arcanedev\SeoHelper\Contracts\Entities\MetaCollection