PHP Class Arcanedev\SeoHelper\Entities\Description

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

Protected Properties

Property Type Description
$content string The meta content.
$max integer The description max length.
$name string The meta name.

Public Methods

Method Description
__construct ( array $configs = [] ) Make Description instance.
__toString ( ) : string Render the tag.
get ( ) : string Get description content.
getContent ( ) : string Get raw description content.
getMax ( ) : integer Get description max length.
make ( string $content, integer $max = 155 ) : self Make a description instance.
render ( ) : string Render the tag.
set ( string $content ) : self Set description content.
setMax ( integer $max ) : self Set description max length.

Private Methods

Method Description
checkMax ( integer $max ) Check title max length.
hasContent ( ) : boolean Check if description has content.

Method Details

__construct() public method

Make Description instance.
public __construct ( array $configs = [] )
$configs array

__toString() public method

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

get() public method

Get description content.
public get ( ) : string
return string

getContent() public method

Get raw description content.
public getContent ( ) : string
return string

getMax() public method

Get description max length.
public getMax ( ) : integer
return integer

make() public static method

Make a description instance.
public static make ( string $content, integer $max = 155 ) : self
$content string
$max integer
return self

render() public method

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

set() public method

Set description content.
public set ( string $content ) : self
$content string
return self

setMax() public method

Set description max length.
public setMax ( integer $max ) : self
$max integer
return self

Property Details

$content protected property

The meta content.
protected string $content
return string

$max protected property

The description max length.
protected int $max
return integer

$name protected property

The meta name.
protected string $name
return string