PHP Class Arcanedev\SeoHelper\Bases\MetaCollection

Author: ARCANEDEV ([email protected])
Inheritance: extends Arcanedev\Support\Collection, implements Arcanedev\SeoHelper\Contracts\Entities\MetaCollectionInterface
Afficher le fichier Open project: arcanedev/seo-helper Class Usage Examples

Protected Properties

Свойство Type Description
$ignored array Ignored tags, they have dedicated class.
$items array The items contained in the collection.
$nameProperty string Meta tag name property.
$prefix string Meta tag prefix.

Méthodes publiques

Méthode Description
__toString ( ) : string Render the tag.
add ( string $name, string $content ) : MetaCollection Add a meta to collection.
addMany ( array $metas ) : MetaCollection Add many meta tags.
forget ( string | array $keys ) : MetaCollection Remove an item from the collection by key.
remove ( array | string $names ) : MetaCollection Remove a meta from the collection by key.
render ( ) : string Render the tag.
setPrefix ( string $prefix ) : MetaCollection Set meta prefix name.

Méthodes protégées

Méthode Description
addMeta ( string $name, string $content ) : MetaCollection Make a meta and add it to collection.
isIgnored ( string $name ) : boolean Check if meta is ignored.
prepareName ( array | string $names ) : array Prepare names.

Private Methods

Méthode Description
refresh ( ) : MetaCollection Refresh meta collection items.

Method Details

__toString() public méthode

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

add() public méthode

Add a meta to collection.
public add ( string $name, string $content ) : MetaCollection
$name string
$content string
Résultat MetaCollection

addMany() public méthode

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

addMeta() protected méthode

Make a meta and add it to collection.
protected addMeta ( string $name, string $content ) : MetaCollection
$name string
$content string
Résultat MetaCollection

forget() public méthode

Remove an item from the collection by key.
public forget ( string | array $keys ) : MetaCollection
$keys string | array
Résultat MetaCollection

isIgnored() protected méthode

Check if meta is ignored.
protected isIgnored ( string $name ) : boolean
$name string
Résultat boolean

prepareName() protected méthode

Prepare names.
protected prepareName ( array | string $names ) : array
$names array | string
Résultat array

remove() public méthode

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

render() public méthode

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

setPrefix() public méthode

Set meta prefix name.
public setPrefix ( string $prefix ) : MetaCollection
$prefix string
Résultat MetaCollection

Property Details

$ignored protected_oe property

Ignored tags, they have dedicated class.
protected array $ignored
Résultat array

$items protected_oe property

The items contained in the collection.
protected array $items
Résultat array

$nameProperty protected_oe property

Meta tag name property.
protected string $nameProperty
Résultat string

$prefix protected_oe property

Meta tag prefix.
protected string $prefix
Résultat string