PHP Класс Arcanedev\SeoHelper\Bases\MetaCollection

Автор: ARCANEDEV ([email protected])
Наследование: extends Arcanedev\Support\Collection, implements Arcanedev\SeoHelper\Contracts\Entities\MetaCollectionInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
refresh ( ) : MetaCollection Refresh meta collection items.

Описание методов

__toString() публичный метод

Render the tag.
public __toString ( ) : string
Результат string

add() публичный метод

Add a meta to collection.
public add ( string $name, string $content ) : MetaCollection
$name string
$content string
Результат MetaCollection

addMany() публичный метод

Add many meta tags.
public addMany ( array $metas ) : MetaCollection
$metas array
Результат MetaCollection

addMeta() защищенный метод

Make a meta and add it to collection.
protected addMeta ( string $name, string $content ) : MetaCollection
$name string
$content string
Результат MetaCollection

forget() публичный метод

Remove an item from the collection by key.
public forget ( string | array $keys ) : MetaCollection
$keys string | array
Результат MetaCollection

isIgnored() защищенный метод

Check if meta is ignored.
protected isIgnored ( string $name ) : boolean
$name string
Результат boolean

prepareName() защищенный метод

Prepare names.
protected prepareName ( array | string $names ) : array
$names array | string
Результат array

remove() публичный метод

Remove a meta from the collection by key.
public remove ( array | string $names ) : MetaCollection
$names array | string
Результат MetaCollection

render() публичный метод

Render the tag.
public render ( ) : string
Результат string

setPrefix() публичный метод

Set meta prefix name.
public setPrefix ( string $prefix ) : MetaCollection
$prefix string
Результат MetaCollection

Описание свойств

$ignored защищенное свойство

Ignored tags, they have dedicated class.
protected array $ignored
Результат array

$items защищенное свойство

The items contained in the collection.
protected array $items
Результат array

$nameProperty защищенное свойство

Meta tag name property.
protected string $nameProperty
Результат string

$prefix защищенное свойство

Meta tag prefix.
protected string $prefix
Результат string