PHP Class Calotype\SEO\Generators\OpenGraphGenerator

Show file Open project: calotype/seo

Protected Properties

Property Type Description
$properties array The properties that we are going to generate.
$required array The properties that are required.

Public Methods

Method Description
fromObject ( Calotype\SEO\Contracts\OpenGraphAware $object ) Use the open graph data of a open graph aware object.
fromRaw ( array $properties ) Set the open graph properties from a raw array.
generate ( ) : string Render the open graph tags.
reset ( ) : void Reset all the properties.

Protected Methods

Method Description
validateProperties ( array $properties ) Validate to make sure the properties contain all required ones.

Method Details

fromObject() public method

Use the open graph data of a open graph aware object.
public fromObject ( Calotype\SEO\Contracts\OpenGraphAware $object )
$object Calotype\SEO\Contracts\OpenGraphAware

fromRaw() public method

Set the open graph properties from a raw array.
public fromRaw ( array $properties )
$properties array

generate() public method

Render the open graph tags.
public generate ( ) : string
return string

reset() public method

Reset all the properties.
public reset ( ) : void
return void

validateProperties() protected method

Validate to make sure the properties contain all required ones.
protected validateProperties ( array $properties )
$properties array

Property Details

$properties protected property

The properties that we are going to generate.
protected array $properties
return array

$required protected property

The properties that are required.
protected array $required
return array