Documentation

Core_Sitemap extends Core_Servant_Properties
in package

Google sitemap http://www.sitemaps.org/protocol.html

  • showInformationsystemGroups(TRUE|FALSE) выводить группы информационных систем, по умолчанию TRUE
  • showInformationsystemItems(TRUE|FALSE) выводить элементы информационных систем, по умолчанию TRUE
  • showInformationsystemTags(TRUE|FALSE) выводить метки информационных систем, по умолчанию FALSE
  • showShopGroups(TRUE|FALSE) выводить группы магазина, по умолчанию TRUE
  • showShopItems(TRUE|FALSE) выводить товары магазина, по умолчанию TRUE
  • showModifications(TRUE|FALSE) выводить модификации товаров магазина, по умолчанию FALSE
  • showShopTags(TRUE|FALSE) выводить метки товаров магазина, по умолчанию FALSE
  • showShopFilter(TRUE|FALSE) выводить SEO-фильтр магазина, по умолчанию TRUE
  • rebuildTime время в секундах, которое должно пройти с момента создания sitemap.xml для его перегенерации. По умолчанию 14400
  • limit ограничение на единичную выборку элементов, по умолчанию 1000. При наличии достаточного объема памяти рекомендуется увеличить параметр
  • createIndex(TRUE|FALSE) разбивать карту на несколько файлов, по умолчанию FALSE
  • perFile Count of nodes per one file
  • defaultProtocol('http://') протокол по умолчанию, устанавливается в зависимоти от опции https у сайта
  • urlset(array('xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9')) массив опций для urlset
  • fileName() схема построения имени файла, по умолчанию 'sitemap-%d.xml'
  • multipleFileName() схема построения имени файла внутри индекса, по умолчанию 'sitemap-%d-%d.xml'
Tags
subpackage

Core

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$_aIndexedFiles  : array<string|int, mixed>
List of sitemap files
$_allowedProperties  : array<string|int, mixed>
Allowed object properties
$_aSiteuserGroups  : array<string|int, mixed>
List of user groups
$_bRebuild  : bool
Is it necessary to rebuild sitemap?
$_countFile  : int
Sitemap files count
$_currentOut  : Core_Out_File
Current output file
$_inFile  : int
Count URL in current file
$_Informationsystems  : array<string|int, mixed>
List of information systems
$_oSite  : Site_Model
Site
$_propertiesValues  : array<string|int, mixed>
Properties values
$_Shops  : array<string|int, mixed>
List of shops
$_siteAlias  : mixed
Current Site Alias
$_unlimitedProperties  : bool
Object has unlimited number of properties

Methods

__construct()  : mixed
Constructor
addAllowedProperties()  : self
Add additional allowed properties
addAllowedProperty()  : self
Add additional allowed property
addInformationsystem()  : mixed
Add Informationsystem
addNode()  : self
Add node to sitemap
addShop()  : mixed
Add Shop
createSitemapDir()  : self
Create sitemap dir
execute()  : self
Executes the business logic.
fillNodes()  : self
Fill nodes of structure
getProtocol()  : string
Get Structure Protocol
getSite()  : Site_Model
Get site
getSitemapDir()  : string
Get sitemap dir
getSitemapHref()  : string
Get sitemap href
set()  : self
Run when writing data to inaccessible properties
setUnlimitedProperties()  : self
Set unlimitedProperties
_close()  : self
Close current output file
_fillInformationsystem()  : self
Add Informationsystem Nodes
_fillShop()  : self
Add Shop Nodes
_getIndexFilePath()  : string
Get index file path
_getNewOutFile()  : mixed
Get new file for sitemap
_getOut()  : Core_Out_File
Get current output file
_open()  : self
Open current output file
_selectStructuresByParentId()  : array<string|int, mixed>
Select Structure_Models by parent_id
_structure()  : self
Add structure nodes by parent

Properties

$_aIndexedFiles

List of sitemap files

protected array<string|int, mixed> $_aIndexedFiles = array()

$_allowedProperties

Allowed object properties

protected array<string|int, mixed> $_allowedProperties = array('showInformationsystemGroups', 'showInformationsystemItems', 'showInformationsystemTags', 'showShopGroups', 'showShopItems', 'showModifications', 'showShopTags', 'showShopFilter', 'rebuildTime', 'defaultProtocol', 'urlset', 'limit', 'createIndex', 'perFile', 'fileName', 'multipleFileName')

$_aSiteuserGroups

List of user groups

protected array<string|int, mixed> $_aSiteuserGroups = \NULL

$_bRebuild

Is it necessary to rebuild sitemap?

protected bool $_bRebuild = \TRUE

$_countFile

Sitemap files count

protected int $_countFile = 1

$_inFile

Count URL in current file

protected int $_inFile = 0

$_Informationsystems

List of information systems

protected array<string|int, mixed> $_Informationsystems = array()

$_propertiesValues

Properties values

protected array<string|int, mixed> $_propertiesValues = array()

$_Shops

List of shops

protected array<string|int, mixed> $_Shops = array()

$_siteAlias

Current Site Alias

protected mixed $_siteAlias = \NULL

$_unlimitedProperties

Object has unlimited number of properties

protected bool $_unlimitedProperties = \FALSE

Methods

addAllowedProperties()

Add additional allowed properties

public addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>

array of properties' names

Return values
self

addAllowedProperty()

Add additional allowed property

public addAllowedProperty(string $property) : self
Parameters
$property : string

property name

Return values
self

addNode()

Add node to sitemap

public addNode(string $loc, int $changefreq, float $priority[, Core_Entity|null $entity = NULL ]) : self
Parameters
$loc : string

location

$changefreq : int

change frequency

$priority : float

priority

$entity : Core_Entity|null = NULL

Core_Entity, e.g. Structure_Model or Shop_Item_Model

Tags
hostcms-event

Core_Sitemap.onBeforeAddNode

hostcms-event

Core_Sitemap.onAfterAddNode

Return values
self

createSitemapDir()

Create sitemap dir

public createSitemapDir() : self
Return values
self

execute()

Executes the business logic.

public execute() : self
Tags
hostcms-event

Core_Sitemap.onBeforeExecute

Return values
self

fillNodes()

Fill nodes of structure

public fillNodes() : self
Tags
hostcms-event

Core_Sitemap.onBeforeFillNodeInformationsystems

hostcms-event

Core_Sitemap.onAfterFillNodeInformationsystems

hostcms-event

Core_Sitemap.onBeforeFillNodeShops

hostcms-event

Core_Sitemap.onAfterFillNodeShops

Return values
self

getSitemapDir()

Get sitemap dir

public getSitemapDir() : string
Return values
string

getSitemapHref()

Get sitemap href

public getSitemapHref() : string
Return values
string

set()

Run when writing data to inaccessible properties

public set(string $property, string $value) : self
Parameters
$property : string

property name

$value : string

property value

Return values
self

setUnlimitedProperties()

Set unlimitedProperties

public setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
$value : bool = TRUE

default TRUR

Return values
self

_close()

Close current output file

protected _close() : self
Return values
self

_fillInformationsystem()

Add Informationsystem Nodes

protected _fillInformationsystem(Structure_Model $oStructure, Informationsystem_Model $oInformationsystem) : self
Parameters
$oStructure : Structure_Model
$oInformationsystem : Informationsystem_Model
Tags
hostcms-event

Core_Sitemap.onBeforeSelectInformationsystemGroups

hostcms-event

Core_Sitemap.onBeforeAddInformationsystemGroup

hostcms-event

Core_Sitemap.onBeforeSelectInformationsystemItems

hostcms-event

Core_Sitemap.onBeforeAddInformationsystemItem

hostcms-event

Core_Sitemap.onBeforeSelectInformationsystemTags

hostcms-event

Core_Sitemap.onBeforeAddInformationsystemTag

Return values
self

_fillShop()

Add Shop Nodes

protected _fillShop(Structure_Model $oStructure, Shop_Model $oShop) : self
Parameters
$oStructure : Structure_Model
$oShop : Shop_Model
Tags
hostcms-event

Core_Sitemap.onBeforeSelectShopGroups

hostcms-event

Core_Sitemap.onBeforeAddShopGroup

hostcms-event

Core_Sitemap.onBeforeSelectShopItems

hostcms-event

Core_Sitemap.onBeforeAddShopItem

hostcms-event

Core_Sitemap.onBeforeSelectShopTags

hostcms-event

Core_Sitemap.onBeforeAddShopTag

hostcms-event

Core_Sitemap.onBeforeAddShopFilter

Return values
self

_getIndexFilePath()

Get index file path

protected _getIndexFilePath() : string
Return values
string

_getNewOutFile()

Get new file for sitemap

protected _getNewOutFile() : mixed

_open()

Open current output file

protected _open() : self
Return values
self

_selectStructuresByParentId()

Select Structure_Models by parent_id

protected _selectStructuresByParentId(int $structure_id) : array<string|int, mixed>
Parameters
$structure_id : int

structure ID

Tags
hostcms-event

Core_Sitemap.onBeforeSelectStructures

Return values
array<string|int, mixed>

_structure()

Add structure nodes by parent

protected _structure([int $structure_id = 0 ]) : self
Parameters
$structure_id : int = 0

structure ID

Tags
hostcms-event

Core_Sitemap.onBeforeAddStructure

Return values
self

        
On this page

Search results