PHP Class Arcanedev\SeoHelper\Entities\MiscTags

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

Protected Properties

Property Type Description
$currentUrl string Current URL.
$metas Arcanedev\SeoHelper\Contracts\Entities\MetaCollection Meta collection.

Public Methods

Method 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

Method 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 method

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

__toString() public method

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

add() public method

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

addMany() public method

Add many meta tags.
public addMany ( array $metas ) : MiscTags
$metas array
return MiscTags

getUrl() public method

Get the current URL.
public getUrl ( ) : string
return string

make() public static method

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

remove() public method

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

render() public method

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

reset() public method

Reset the meta collection.
public reset ( ) : MiscTags
return MiscTags

setUrl() public method

Set the current URL.
public setUrl ( string $url ) : MiscTags
$url string
return MiscTags

Property Details

$currentUrl protected_oe property

Current URL.
protected string $currentUrl
return string

$metas protected_oe property

Meta collection.
protected MetaCollection,Arcanedev\SeoHelper\Contracts\Entities $metas
return Arcanedev\SeoHelper\Contracts\Entities\MetaCollection