The documentation is incomplete. The Vae Soli! team works hard to make it as exhaustive as possible with tons of useful examples and easy to understand explanations.
On top of that, we have decided to use our own tool to generate the documentation you read. This also takes time to fine-tune. Our goal is have better documentation, easier to read, easier to use, completely integrated with our site.
Even though NOT finalized, you can now link back to our documentation pages as we have decided once and for all about the structure of our documents and where they all reside on our server.
Thank you very much
The Vae Soli! team.
Generated by The Vae Soli! Documentor: Guide v. 1.3.0015 on 14-10-2013 13:09:57 (DD-MM-YYYY HH:mm:SS). This documentation is built with Vae Soli! functions and classes!
Assertions count: 0
Assertions successful: 0
Assertion failures: 0
LS_XML_SITEMAP_CLASS_PWH
: Define "LS" XMLSitemap (Pat Was Here)
VAESOLI_PATH
: Define the path where Vae Soli! is installed
VAESOLI_PLUGINS
: Define the path where plugins are located
LSApplication.errors.inc
: Application error codes
LSXMLSitemap
Generates a XML sitemap fileName | Visibility | Type | Description |
---|---|---|---|
$aPages |
public | array | Array of pages to be included in the sitemap |
$iLimit |
public | int | Size limit of the sitemap.xml file (in bytes) |
$iURLCount |
public | int | URL count limit per sitemap.xml file |
$oApp |
public | LSApplication | Application object |
$oDom |
public | LSDom | Document object model |
$oTracer |
public | LSTracer | Tracer object (tracing and logging) |
$oXPath |
public | LSXPath | XPath object |
$szFile |
public | string | sitemap.xml file |
$szGeoramaFile |
public | string | Name of the georama file |
$szRoot |
public | string | Root of the site |
__construct()
: Class constructor__construct( $oApplication,$szFile )
Name | Type | Description |
---|---|---|
$oApplication |
LSApplication | Application object. Optional.
null by default. |
$szFile |
string | Output file name. Optional.
blank by default. |
(void)
$oSitemap = new LSXMLSitemap(); $oSitemap->szRoot = $_SERVER['DOCUMENT_ROOT']; $oSitemap->szGeoramaFile = $_SERVER['DOCUMENT_ROOT'] . '/geo/georama.xml; if ( ( $iErrCode = $oXMLSitemap->Create( $_SERVER['SERVER_NAME'] ) ) === 0 ) { echo "<p>sitemap.xml successfully created</p>"; } else { echo "<p>sitemap.xml creation failure (code: {$iErrCode})</p>"; }
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec ... *}
).
Add()
: Adds a page to the list of pages to be saved in the XML fileThe Sitemap protocol format consists of XML tags. All data values in a Sitemap must be entity-escaped. The file itself must be UTF-8 encoded.
Add( $szURL,$szPriority,$szFrequency )
Name | Type | Description |
---|---|---|
$szURL |
string | The URL to add to the sitemap |
$szPriority |
string | The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value has no effect on your pages compared to pages on other sites, and only lets the search engines know which of your pages you deem most important so they can order the crawl of your pages in the way you would most like. Deafult priority is set to '0.5'. |
$szFrequency |
string | "always" , "hourly" , "daily" |
(boolean) true
if XML file successfully; false
if not
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec ... *}
).
Create()
: Creates a sitemap.xml file based on the definitions found in the georamaWhen dealing with multi-domains (eg. vaesoli.org, vaesoli.com, ...) the sitemap.xml file will include all URLs of all domains.
The $szDomain
parameter is not yet used as it should be.
Create( $szDomain )
Name | Type | Description |
---|---|---|
$szDomain |
unknown | Domain for which the sitemap.xml file must be created. |
(integer) LS_VAESOLI_SUCCESS_SUCCESS
upon success (0
).
Otherwise, here's a list of error codes:
LS_XMLSITEMAP_ERROR_CANNOT_ADD_PAGE
LS_XMLSITEMAP_WARNING_NO_PAGE_FOUND
LS_XMLSITEMAP_ERROR_CANNOT_CREATE_XPATH
LS_XMLSITEMAP_ERROR_CANNOT_LOAD_XML
LS_XMLSITEMAP_ERROR_CANNOT_CREATE_DOM
LS_XMLSITEMAP_ERROR_GEORAMA_EMPTY_FILENAME
LS_XMLSITEMAP_ERROR_CANNOT_SAVE_XML
All codes defined in LSApplication.errors.inc
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec ... *}
).
Save()
: Saves the XML fileSave()
None
(boolean) true
if XML file successfully; false
if not
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec ... *}
).