PHP Class Calotype\SEO\Generators\SitemapGenerator

Afficher le fichier Open project: calotype/seo

Protected Properties

Свойство Type Description
$closures array Closures used for lazy loading.
$entries array All the entries of the sitemap.
$frequencies array The allowed values for the change frequency.
$replacements array The attributes that should be replaced with their valid counterpart for readability.
$required array The required fields of a sitemap entry.

Méthodes publiques

Méthode Description
add ( mixed $object ) Add a SitemapAware object to the sitemap.
addAll ( array | Traversabl\Traversable $objects ) Add multiple SitemapAware objects to the sitemap.
addRaw ( array $data ) Add a raw entry to the sitemap.
contains ( string $url ) : boolean Check if the sitemap contains an url.
generate ( ) : string Generate the xml for the sitemap.
prepareData ( array $data ) : array Prepare the data.
reset ( ) : void Clean all entries from the sitemap.

Méthodes protégées

Méthode Description
loadClosures ( ) : void Load the lazy loaded elements.
replaceAttribute ( string $attribute ) : string Replace an attribute with it's replacement if available.
replaceAttributes ( array $data ) : array Replace the attribute names with their replacements.
validateData ( array $data ) Validate the data for a sitemap entry.
validateObject ( mixed $element ) Validate an element.

Method Details

add() public méthode

Add a SitemapAware object to the sitemap.
public add ( mixed $object )
$object mixed

addAll() public méthode

Add multiple SitemapAware objects to the sitemap.
public addAll ( array | Traversabl\Traversable $objects )
$objects array | Traversabl\Traversable

addRaw() public méthode

Add a raw entry to the sitemap.
public addRaw ( array $data )
$data array

contains() public méthode

Check if the sitemap contains an url.
public contains ( string $url ) : boolean
$url string
Résultat boolean

generate() public méthode

Generate the xml for the sitemap.
public generate ( ) : string
Résultat string

loadClosures() protected méthode

Load the lazy loaded elements.
protected loadClosures ( ) : void
Résultat void

prepareData() public méthode

Prepare the data.
public prepareData ( array $data ) : array
$data array
Résultat array

replaceAttribute() protected méthode

Replace an attribute with it's replacement if available.
protected replaceAttribute ( string $attribute ) : string
$attribute string
Résultat string

replaceAttributes() protected méthode

Replace the attribute names with their replacements.
protected replaceAttributes ( array $data ) : array
$data array
Résultat array

reset() public méthode

Clean all entries from the sitemap.
public reset ( ) : void
Résultat void

validateData() protected méthode

Validate the data for a sitemap entry.
protected validateData ( array $data )
$data array

validateObject() protected méthode

Validate an element.
protected validateObject ( mixed $element )
$element mixed

Property Details

$closures protected_oe property

Closures used for lazy loading.
protected array $closures
Résultat array

$entries protected_oe property

All the entries of the sitemap.
protected array $entries
Résultat array

$frequencies protected_oe property

The allowed values for the change frequency.
protected array $frequencies
Résultat array

$replacements protected_oe property

The attributes that should be replaced with their valid counterpart for readability.
protected array $replacements
Résultat array

$required protected_oe property

The required fields of a sitemap entry.
protected array $required
Résultat array