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
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
$_currentOut
Current output file
protected
Core_Out_File
$_currentOut
= \NULL
$_inFile
Count URL in current file
protected
int
$_inFile
= 0
$_Informationsystems
List of information systems
protected
array<string|int, mixed>
$_Informationsystems
= array()
$_oSite
Site
protected
Site_Model
$_oSite
= \NULL
$_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
__construct()
Constructor
public
__construct(Site_Model $oSite) : mixed
Parameters
- $oSite : Site_Model
-
Site object
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
selfaddAllowedProperty()
Add additional allowed property
public
addAllowedProperty(string $property) : self
Parameters
- $property : string
-
property name
Return values
selfaddInformationsystem()
Add Informationsystem
public
addInformationsystem(int $structure_id, Informationsystem_Model $oInformationsystem) : mixed
Parameters
- $structure_id : int
- $oInformationsystem : Informationsystem_Model
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
Return values
selfaddShop()
Add Shop
public
addShop(int $structure_id, Shop_Model $oShop) : mixed
Parameters
- $structure_id : int
- $oShop : Shop_Model
createSitemapDir()
Create sitemap dir
public
createSitemapDir() : self
Return values
selfexecute()
Executes the business logic.
public
execute() : self
Tags
Return values
selffillNodes()
Fill nodes of structure
public
fillNodes() : self
Tags
Return values
selfgetProtocol()
Get Structure Protocol
public
getProtocol(Structure_Model $oStructure) : string
Parameters
- $oStructure : Structure_Model
Return values
stringgetSite()
Get site
public
getSite() : Site_Model
Return values
Site_ModelgetSitemapDir()
Get sitemap dir
public
getSitemapDir() : string
Return values
stringgetSitemapHref()
Get sitemap href
public
getSitemapHref() : string
Return values
stringset()
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
selfsetUnlimitedProperties()
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
Return values
self_fillShop()
Add Shop Nodes
protected
_fillShop(Structure_Model $oStructure, Shop_Model $oShop) : self
Parameters
- $oStructure : Structure_Model
- $oShop : Shop_Model
Tags
Return values
self_getIndexFilePath()
Get index file path
protected
_getIndexFilePath() : string
Return values
string_getNewOutFile()
Get new file for sitemap
protected
_getNewOutFile() : mixed
_getOut()
Get current output file
protected
_getOut() : Core_Out_File
Return values
Core_Out_File_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
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