PHP Class Arcanedev\SeoHelper\Entities\MiscTags

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

Protected Properties

Свойство Type Description
$currentUrl string Current URL.
$metas Arcanedev\SeoHelper\Contracts\Entities\MetaCollection Meta collection.

Méthodes publiques

Méthode Description
__construct ( array $configs = [] ) Make MiscTags instance.
__toString ( ) : string Render the tag.
add ( string $name, string $content ) : MiscTags Add a meta tag.
addMany ( array $metas ) : MiscTags Add many meta tags.
getUrl ( ) : string Get the current URL.
make ( array $defaults = [] ) : MiscTags Make MiscTags instance.
remove ( array | string $names ) : MiscTags Remove a meta from the meta collection by key.
render ( ) : string Render the tag.
reset ( ) : MiscTags Reset the meta collection.
setUrl ( string $url ) : MiscTags Set the current URL.

Private Methods

Méthode Description
addCanonical ( ) : MiscTags Add the canonical link.
addRobotsMeta ( ) : MiscTags Add the robots meta.
hasUrl ( ) : boolean Check if has the current URL.
init ( ) Start the engine.
isCanonicalEnabled ( ) : boolean Check if canonical is enabled.
isRobotsEnabled ( ) : boolean Check if blocking robots is enabled.

Method Details

__construct() public méthode

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

__toString() public méthode

Render the tag.
public __toString ( ) : string
Résultat string

add() public méthode

Add a meta tag.
public add ( string $name, string $content ) : MiscTags
$name string
$content string
Résultat MiscTags

addMany() public méthode

Add many meta tags.
public addMany ( array $metas ) : MiscTags
$metas array
Résultat MiscTags

getUrl() public méthode

Get the current URL.
public getUrl ( ) : string
Résultat string

make() public static méthode

Make MiscTags instance.
public static make ( array $defaults = [] ) : MiscTags
$defaults array
Résultat MiscTags

remove() public méthode

Remove a meta from the meta collection by key.
public remove ( array | string $names ) : MiscTags
$names array | string
Résultat MiscTags

render() public méthode

Render the tag.
public render ( ) : string
Résultat string

reset() public méthode

Reset the meta collection.
public reset ( ) : MiscTags
Résultat MiscTags

setUrl() public méthode

Set the current URL.
public setUrl ( string $url ) : MiscTags
$url string
Résultat MiscTags

Property Details

$currentUrl protected_oe property

Current URL.
protected string $currentUrl
Résultat string

$metas protected_oe property

Meta collection.
protected MetaCollection,Arcanedev\SeoHelper\Contracts\Entities $metas
Résultat Arcanedev\SeoHelper\Contracts\Entities\MetaCollection