Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:core:sitemap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scriptlog:lib:core:sitemap [2026/09/26 09:09] – admin adminscriptlog:lib:core:sitemap [2026/09/26 09:34] (current) – admin admin
Line 14: Line 14:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@author'' | Osman Üngür <[email protected]> | +| ''@author'' | Osman Üngür <[email protected]> | 
-  | ''@license'' | http://opensource.org/licenses/MIT MIT License |+| ''@license'' | http://opensource.org/licenses/MIT MIT License |
  
 ======= Inheritance ======= ======= Inheritance =======
Line 24: Line 24:
 ======= Constants (6) ======= ======= Constants (6) =======
  
-  ^ Visibility ^ Name ^ Value ^ Line ^ +^ Visibility ^ Name ^ Value ^ Line ^ 
-  | ''-'' | ''EXT'' | '''.xml';'' | 33 | +| ''-'' | ''EXT'' | '''.xml';'' | 33 | 
-  | ''-'' | ''SCHEMA'' | '''http://www.sitemaps.org/schemas/sitemap/0.9';'' | 34 | +| ''-'' | ''SCHEMA'' | '''http://www.sitemaps.org/schemas/sitemap/0.9';'' | 34 | 
-  | ''-'' | ''DEFAULT_PRIORITY'' | ''0.5;'' | 35 | +| ''-'' | ''DEFAULT_PRIORITY'' | ''0.5;'' | 35 | 
-  | ''-'' | ''ITEM_PER_SITEMAP'' | ''50000;'' | 36 | +| ''-'' | ''ITEM_PER_SITEMAP'' | ''50000;'' | 36 | 
-  | ''-'' | ''SEPERATOR'' | '''-';'' | 37 | +| ''-'' | ''SEPERATOR'' | '''-';'' | 37 | 
-  | ''-'' | ''INDEX_SUFFIX'' | '''index';'' | 38 |+| ''-'' | ''INDEX_SUFFIX'' | '''index';'' | 38 |
  
-======= Properties (3) =======+======= Properties (6) =======
  
-  ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ +^ Visibility ^ Type ^ Name ^ Default ^ Line ^ 
-  | ''private'' | ''(untyped)'' | ''$filename'' | '''sitemap';'' | 29 | +| ''private'' | ''(untyped)'' | ''$writer'' |  | 26 | 
-  | ''private'' | ''(untyped)'' | ''$current_item'' | ''0;'' | 30 | +| ''private'' | ''(untyped)'' | ''$domain'' |  | 27 | 
-  | ''private'' | ''(untyped)'' | ''$current_sitemap'' | ''0;'' | 31 |+| ''private'' | ''(untyped)'' | ''$path'' |  | 28 | 
 +| ''private'' | ''(untyped)'' | ''$filename'' | '''sitemap''' | 29 | 
 +| ''private'' | ''(untyped)'' | ''$current_item'' | ''0'' | 30 | 
 +| ''private'' | ''(untyped)'' | ''$current_sitemap'' | ''0'' | 31 |
  
 ======= Methods (18) ======= ======= Methods (18) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public | ''__construct()'' |  | 44 | +| public | ''__construct()'' |  | 44 | 
-  | public | ''setDomain()'' | Sets root path of the website, starting with http:// or https:// | 54 | +| public | ''setDomain()'' | Sets root path of the website, starting with http:// or https:// | 54 | 
-  | private | ''getDomain()'' | Returns root path of the website | 65 | +| private | ''getDomain()'' | Returns root path of the website | 65 | 
-  | private | ''getWriter()'' | Returns XMLWriter object instance | 75 | +| private | ''getWriter()'' | Returns XMLWriter object instance | 75 | 
-  | private | ''setWriter()'' | Assigns XMLWriter object instance | 85 | +| private | ''setWriter()'' | Assigns XMLWriter object instance | 85 | 
-  | private | ''getPath()'' | Returns path of sitemaps | 95 | +| private | ''getPath()'' | Returns path of sitemaps | 95 | 
-  | public | ''setPath()'' | Sets paths of sitemaps | 106 | +| public | ''setPath()'' | Sets paths of sitemaps | 106 | 
-  | private | ''getFilename()'' | Returns filename of sitemap file | 117 | +| private | ''getFilename()'' | Returns filename of sitemap file | 117 | 
-  | public | ''setFilename()'' | Sets filename of sitemap file | 128 | +| public | ''setFilename()'' | Sets filename of sitemap file | 128 | 
-  | private | ''getCurrentItem()'' | Returns current item count | 139 | +| private | ''getCurrentItem()'' | Returns current item count | 139 | 
-  | private | ''incCurrentItem()'' | Increases item counter | 148 | +| private | ''incCurrentItem()'' | Increases item counter | 148 | 
-  | private | ''getCurrentSitemap()'' | Returns current sitemap file count | 158 | +| private | ''getCurrentSitemap()'' | Returns current sitemap file count | 158 | 
-  | private | ''incCurrentSitemap()'' | Increases sitemap file count | 167 | +| private | ''incCurrentSitemap()'' | Increases sitemap file count | 167 | 
-  | private | ''startSitemap()'' | Prepares sitemap XML document | 176 | +| private | ''startSitemap()'' | Prepares sitemap XML document | 176 | 
-  | public | ''addItem()'' | Adds an item to sitemap | 200 | +| public | ''addItem()'' | Adds an item to sitemap | 200 | 
-  | private | ''getLastModifiedDate()'' | Prepares given date for sitemap | 231 | +| private | ''getLastModifiedDate()'' | Prepares given date for sitemap | 231 | 
-  | private | ''endSitemap()'' | Finalizes tags of sitemap XML document. | 245 | +| private | ''endSitemap()'' | Finalizes tags of sitemap XML document. | 245 | 
-  | public | ''createSitemapIndex()'' | Writes Google sitemap index for generated sitemap files | 260 |+| public | ''createSitemapIndex()'' | Writes Google sitemap index for generated sitemap files | 260 |
  
  
Line 70: Line 73:
 //lines 44–47 (4)// //lines 44–47 (4)//
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$domain'' | ''(untyped)'' | //required// | //none// |+|  ''$domain'' |  ''(untyped)'' |  //required// |  //none// |
  
  
Line 84: Line 87:
 Sets root path of the website, starting with http:// or https:// Sets root path of the website, starting with http:// or https://
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$domain'' | ''(untyped)'' | //required// | //none// |+|  ''$domain'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 130: Line 133:
 Assigns XMLWriter object instance Assigns XMLWriter object instance
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$writer'' | ''\XMLWriter'' | //required// | //none// |+|  ''$writer'' |  ''\XMLWriter'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
Line 161: Line 164:
 Sets paths of sitemaps Sets paths of sitemaps
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$path'' | ''(untyped)'' | //required// | //none// |+|  ''$path'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — Sitemap **Returns:** ''(none declared)'' — Sitemap
Line 192: Line 195:
 Sets filename of sitemap file Sets filename of sitemap file
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$filename'' | ''(untyped)'' | //required// | //none// |+|  ''$filename'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — Sitemap **Returns:** ''(none declared)'' — Sitemap
Line 283: Line 286:
 Adds an item to sitemap Adds an item to sitemap
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$loc'' | ''(untyped)'' | //required// | URL of the page. This value must be less than 2,048 characters. | +|  ''$loc'' |  ''(untyped)'' |  //required// |  URL of the page. This value must be less than 2,048 characters. | 
-  | ''$priority'' | ''(untyped)'' | ''self::DEFAULT_PRIORITY'' | The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. | +|  ''$priority'' |  ''(untyped)'' |  ''self::DEFAULT_PRIORITY'' |  The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. | 
-  | ''$changefreq'' | ''(untyped)'' | ''null'' | How frequently the page is likely to change. Valid values are always, hourly, daily, weekly, monthly, yearly and never. | +|  ''$changefreq'' |  ''(untyped)'' |  ''null'' |  How frequently the page is likely to change. Valid values are always, hourly, daily, weekly, monthly, yearly and never. | 
-  | ''$lastmod'' | ''(untyped)'' | ''null'' | The date of last modification of url. Unix timestamp or any English textual datetime description. |+|  ''$lastmod'' |  ''(untyped)'' |  ''null'' |  The date of last modification of url. Unix timestamp or any English textual datetime description. |
  
 **Returns:** ''(none declared)'' — Sitemap **Returns:** ''(none declared)'' — Sitemap
Line 302: Line 305:
 Prepares given date for sitemap Prepares given date for sitemap
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$date'' | ''(untyped)'' | //required// | Unix timestamp or any English textual datetime description |+|  ''$date'' |  ''(untyped)'' |  //required// |  Unix timestamp or any English textual datetime description |
  
 **Returns:** ''(none declared)'' — string Year-Month-Day formatted date. **Returns:** ''(none declared)'' — string Year-Month-Day formatted date.
Line 333: Line 336:
 Writes Google sitemap index for generated sitemap files Writes Google sitemap index for generated sitemap files
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$loc'' | ''(untyped)'' | //required// | Accessible URL path of sitemaps | +|  ''$loc'' |  ''(untyped)'' |  //required// |  Accessible URL path of sitemaps | 
-  | ''$lastmod'' | ''(untyped)'' | '''Today''' | The date of last modification of sitemap. Unix timestamp or any English textual datetime description. |+|  ''$lastmod'' |  ''(untyped)'' |  '''Today''' |  The date of last modification of sitemap. Unix timestamp or any English textual datetime description. |
  
 **Returns:** ''(none declared)'' **Returns:** ''(none declared)''
scriptlog/lib/core/sitemap.1790413762.txt.gz · Last modified: by admin