PHP Class Arcanedev\SeoHelper\Helpers\Meta

Author: ARCANEDEV ([email protected])
Inheritance: implements Arcanedev\SeoHelper\Contracts\Helpers\Meta
Show file Open project: arcanedev/seo-helper Class Usage Examples

Protected Properties

Property Type Description
$content string Meta content.
$name string Meta name.
$nameProperty string The meta name property.
$prefix string Meta prefix name.

Public Methods

Method Description
__construct ( string $name, string $content, string $propertyName = 'name', string $prefix = '' ) Make Meta instance.
__toString ( ) : string Render the tag.
clean ( string $value ) : string Clean all the inputs.
isValid ( ) : boolean Check if meta is valid.
key ( ) : string Get the meta name.
make ( string $name, string $content, string $propertyName = 'name', string $prefix = '' ) : Meta Make Meta instance.
render ( ) : string Render the tag.
setNameProperty ( string $nameProperty ) : Meta Set the meta property name.
setPrefix ( string $prefix ) : Meta Set the meta prefix name.

Protected Methods

Method Description
isLink ( ) : boolean Check if meta is a link tag.

Private Methods

Method Description
checkNameProperty ( string &$nameProperty ) Check the name property.
getContent ( ) : string Get the meta content.
getName ( boolean $prefixed = true ) : string Get the meta name.
renderLink ( ) : string Render the link tag.
renderMeta ( ) : string Render the meta tag.
setContent ( string $content ) : Meta Set the meta content.
setName ( string $name ) : Meta Set the meta name.

Method Details

__construct() public method

Make Meta instance.
public __construct ( string $name, string $content, string $propertyName = 'name', string $prefix = '' )
$name string
$content string
$propertyName string
$prefix string

__toString() public method

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

clean() public method

Clean all the inputs.
public clean ( string $value ) : string
$value string
return string

isValid() public method

Check if meta is valid.
public isValid ( ) : boolean
return boolean

key() public method

Get the meta name.
public key ( ) : string
return string

make() public static method

Make Meta instance.
public static make ( string $name, string $content, string $propertyName = 'name', string $prefix = '' ) : Meta
$name string
$content string
$propertyName string
$prefix string
return Meta

render() public method

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

setNameProperty() public method

Set the meta property name.
public setNameProperty ( string $nameProperty ) : Meta
$nameProperty string
return Meta

setPrefix() public method

Set the meta prefix name.
public setPrefix ( string $prefix ) : Meta
$prefix string
return Meta

Property Details

$content protected property

Meta content.
protected string $content
return string

$name protected property

Meta name.
protected string $name
return string

$nameProperty protected property

The meta name property.
protected string $nameProperty
return string

$prefix protected property

Meta prefix name.
protected string $prefix
return string