Niouzes

< Décembre 2018 >
Lu Ma Me Je Ve Sa Di
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Citation

Attention

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.

2018-12-06 à 02:12:30

Table Of Contents

  1. FOUNDATION (functions) (01/04/2015)
  2. LSAction (class) (01/04/2015)
  3. LSAddress (class) (01/04/2015)
  4. LSAdministrativeArea (class) (01/04/2015)
  5. LSApplication (class) (14/10/2013)
  6. LSArray (class) (14/10/2013)
  7. LSArticle (class) (18/02/2014)
  8. LSAssertion (class) (14/10/2013)
  9. LSAudience (class) (18/02/2014)
  10. AUTOLOAD (function) (21/04/2014)
  11. LSAutoReference (class) (14/10/2013)
  12. LSBag (class) (14/10/2013)
  13. LSBBCodes (class) (10/06/2014)
  14. LSBrowser (class) (14/10/2013)
  15. LSCache (class) (14/10/2013)
  16. LSCalculator (class) (14/10/2013)
  17. LSCalendar (class) (14/10/2013)
  18. LSCameraSnapshot (class) (14/10/2013)
  19. LSCitation (class) (14/10/2013)
  20. LSClass (class) (14/10/2013)
  21. LSCode (class) ()
  22. Colors (functions) (06/12/2018)
  23. LSContactForm (class) (14/10/2013)
  24. LSContainer (class) (14/10/2013)
  25. LSContents (class) (14/10/2013)
  26. LSContentsAccounts (class) (14/10/2013)
  27. LSContentsArticles (class) (14/10/2013)
  28. LSContentsAtomicClock (class) (14/10/2013)
  29. LSContentsBusinessCoordinates (class) (14/10/2013)
  30. LSContentsBusinessOff (class) (14/10/2013)
  31. LSContentsBusinessOpeningHours (class) (14/10/2013)
  32. LSContentsBreadcrumb (class) (14/10/2013)
  33. LSContentsCalendar (class) (14/10/2013)
  34. LSContentsCatalogue (class) (14/10/2013)
  35. LSContentsCharter (class) (18/02/2014)
  36. LSContentsCitation (class) (14/10/2013)
  37. LSContentsClock (class) (14/10/2013)
  38. LSContentsComments (class) (14/10/2013)
  39. LSContentsCookieUsage (class) (14/10/2013)
  40. LSContentsCountdown (class) (14/10/2013)
  41. LSContentsDatetime (class) (14/10/2013)
  42. LSContentsHeartbeat (class) (14/10/2013)
  43. LSContentsIFrame (class) (14/10/2013)
  44. LSContentsImageGallery (class) (14/10/2013)
  45. LSContentsLanguageSwitchers (class) (14/10/2013)
  46. LSContentsLegal (class) (18/02/2014)
  47. LSContentsMicronews (class) (14/10/2013)
  48. LSContentsMyAccount (class) (14/10/2013)
  49. LSContentsPaymentOptions (class) (14/10/2013)
  50. LSContentsPinboard (class) (14/10/2013)
  51. LSContentsRememberPassword (class) (14/10/2013)
  52. LSContentsRSS (class) (14/10/2013)
  53. LSContentsSiteManager (class) (14/10/2013)
  54. LSContentsSitemap (class) (14/10/2013)
  55. LSContentsShare (class) (14/10/2013)
  56. LSContentsStopwatch (class) (14/10/2013)
  57. LSContentsTagCloud (class) (14/10/2013)
  58. LSContentsTodosOnPage (class) (14/10/2013)
  59. LSContentsW3C (class) (14/10/2013)
  60. LSContentsWeather (class) (14/10/2013)
  61. LSControl (class) (14/10/2013)
  62. LSCreativeWork (class) (18/02/2014)
  63. LSCursor (class) (09/03/2015)
  64. LSCustomer (class) (14/10/2013)
  65. LSDataEnvironment (class) (14/10/2013)
  66. Dates (functions) (01/04/2015)
  67. LSDate (class) (14/10/2013)
  68. LSDictionary (class) (14/10/2013)
  69. LSDom, LSDomNode and LSXPath (class) (30/04/2014)
  70. LSErrors and LSError (classes) (14/10/2013)
  71. LSException (class) (16/10/2013)
  72. LSExplorer (class) (14/10/2013)
  73. LSFieldset (class) (14/10/2013)
  74. LSFile (class) (14/10/2013)
  75. LSFileProperties (class) (14/10/2013)
  76. Files (functions) (01/04/2015)
  77. Finance (functions) (01/04/2015)
  78. LSFootnotes (class) (22/02/2014)
  79. LSForm (class) (09/06/2014)
  80. LSFunction (class) (14/10/2013)
  81. LSGeorama (class) (24/10/2013)
  82. LSGeoramaVar (class) (24/10/2013)
  83. LSGlossary (class) (09/03/2015)
  84. LSGroup (class) (14/10/2013)
  85. HTML (functions) (01/04/2015)
  86. LSHttp (class) (14/10/2013)
  87. HTTP (functions) (01/04/2015)
  88. LSImageGallery (class) (14/10/2013)
  89. Images (functions) (01/04/2015)
  90. LSInput (class) (26/04/2014)
  91. IP (functions) (01/04/2015)
  92. LSIslandAbstract (14/10/2013)
  93. LSIslandFormAbstract (class) (14/10/2013)
  94. LSLabel (class) (14/10/2013)
  95. LSLanguageSwitchers (class) (14/10/2013)
  96. LSLatin (class) (14/10/2013)
  97. LSLegalPerson (class) (14/10/2013)
  98. LSLinkedList (class) (14/10/2013)
  99. LSList (class) (14/10/2013)
  100. Mails (functions) (01/04/2015)
  101. LSMap (class) (14/10/2013)
  102. Math (functions) (01/04/2015)
  103. LSMicronews (class) (18/02/2014)
  104. Miscellaneous (functions) (01/04/2015)
  105. LSModuleAbstract (class) (14/10/2013)
  106. LSNaturalPerson (class) (14/10/2013)
  107. LSNewsArticle (class) (18/02/2014)
  108. LSNote (class) (14/10/2013)
  109. LSMotherNature (class) (16/10/2013)
  110. LSPage (class) (18/02/2014)
  111. LSParameter (class) (14/10/2013)
  112. LSPaymentOptions (class) (14/10/2013)
  113. LSPeopleAudience (class) (18/02/2014)
  114. LSPerson (class) (14/10/2013)
  115. LSPlace (class) (18/02/2014)
  116. LSProperty (class) (14/10/2013)
  117. LSPublication (class) (14/10/2013)
  118. LSRequirement (class) (14/10/2013)
  119. LSReturn (class) (24/10/2013)
  120. LSRisk (class) (14/10/2013)
  121. LSSentanaiAbstract (14/10/2013)
  122. LSServiceMessage (class) (14/10/2013)
  123. LSSession (class) (14/10/2013)
  124. LSSiteManager (class) (14/10/2013)
  125. LSSitemap (class) (14/10/2013)
  126. LSSockets (class) (14/10/2013)
  127. LSSoftwareApplication (class) (18/02/2014)
  128. LSSource (class) (14/10/2013)
  129. Strings (functions) (31/07/2016)
  130. LSSupplier (class) (14/10/2013)
  131. System (functions) (01/04/2015)
  132. LSTag (class) (21/04/2014)
  133. LSTagCloud (class) (14/10/2013)
  134. LSTechArticle (class) (18/02/2014)
  135. LSThing (class) (18/02/2014)
  136. LSTimeline (class) (14/10/2013)
  137. LSTimer (class) (16/10/2013)
  138. LSTracer (class) (09/03/2015)
  139. LSUnitTesting (class) (14/10/2013)
  140. URL (functions) (01/04/2015)
  141. LSUser (class) (09/03/2015)
  142. LSUserMgr (class) (14/10/2013)
  143. LSVaesoli (class) (09/06/2014)
  144. LSVersion (class) (14/10/2013)
  145. LSWebSite (class) (14/10/2013)
  146. LSWidget (class) (14/10/2013)
  147. LSWireTransferForm (class) (14/10/2013)
  148. LSXMLSitemap (class) (14/10/2013)
  149. XML (functions) (01/04/2015)

LSPage.class.php

Generated by The Vae Soli! Documentor: Guide v. 1.3.0018 on 18-02-2014 20:11:46 (DD-MM-YYYY HH:mm:SS). This documentation is built with Vae Soli! functions and classes!

File Properties

C:\websites\vaesoli.org\www\httpdocs/vaesoli/include/LSPage.class.phpC:\websites\vaesoli.org\www\httpdocs\vaesoli\include\LSPage.class.phpapplication/force-downloadC:\websites\vaesoli.org\www\httpdocs\vaesoli\include393788 bytes03/08/2013 23:27:5218/02/2014 08:34:1118/02/2014 08:34:11

Compliance

Assertions count: 23

Assertions successful: 23

Assertion failures: 0

Early Warning

LSPage.class.php exceeds 51200 bytes. We suggest this file got broken down in smaller chunks!

LSPage.class.php contains 7298 lines of code, which exceeds the suggested limit of 1024 lines. We suggest this file got broken down in smaller chunks!

Manifest Constants

LS_PAGE_CLASS_PWH: Define "LS" page (Pat Was Here)

VAESOLI_PATH: Define the path where Vae Soli! is installed

VAESOLI_PLUGINS: Define the path where plugins are located

LSVPERF_JS: Define the JS source needed for performance counters

LSVPERF_CSS: Define the CSS source needed for performance counters

LSVPERF_REPORT_JS: Define the JS source needed for performance report

LSVSTORAGE_JS: Define the JS source needed to save data in the local storage

LSVFILE_JS: Define the JS source needed to parse files and URLs

Sources required

LSVfc.class.php: Vae Soli! Foundation classes

LSBag.class.php: Bag class

LSApplication.class.php: Application class

LSApplication.errors.inc: Application error codes

LSVersion.class.php: Version class

LSUser.class.php: User class

LSHttpResponseHeader.class.php: HTTP Response header class

LSHtml.functions.php: HTML functions

LSAutoload.php: Class autoloading

LSServiceMessage.inc: Service Messages constants

LSUnitTesting.class.php: Vae Soli! Unit Testing

Classes

LSPage extends LSMotherNature

The LSPage class contains all the inner intelligence to display a page whose definition is maintained in the georama (LSGeorama).

This class is responsible to grab all page details, check the page definition in the georama (LSGeorama), aggregate the content (all archipelagos, all islands, all switches), and render the whole thing to the browser of the visitor.

Notes
Note: A/B Testing

Islands and pages do implement A/B Testing









Properties
NameVisibilityTypeDescription
$AcceptEmptyBrowser public bool Do we accept empty User Agents? true by default
$CheckDoubleLogin public bool Must we check if multiple login / logoff islands included in the page?
$DocType public string DOCTYPE of the page
$IncludeTemplateMain public string Callback to be called in substitution of the IncludeTemplate() default code
$IncludeTemplatePost public string Callback to call AFTER the main code of the IncludeTemplate() method
$IncludeTemplatePre public string Callback to call BEFORE anything else in IncludeTemplate() method
$IsBlog public bool Accepts vistors comments or not ?
$IsDebug public bool Page in debug mode?
$IsEditable public bool Is this page editable (true by default)
$IsStats public boolean Should stats be maintained for that page
$IslandSaveMain public string Callback to be called in substitution of the IslandSave() default code
$IslandSavePost public string Callback to call AFTER the main code of the IslandSave() method
$IslandSavePre public string Callback to call BEFORE anything else in IslandSavePre() method
$LoginMain public string Callback that replaces the main code of the Login() method
$LoginPost public string Callback to call AFTER the main code of the Login() method
$LoginPre public string Callback to call BEFORE anything else in Login() method
$MustCacheForBots public bool Cache page for bots? (86400 sec = 1 day)
$MustStripWhitespaces public bool Do we have to strip all multiple occurrences of spaces (caution with &lt;pre&gt;...&lt;/pre&gt; blocks!)
$MustSubstitute public bool Must apply substitutions or not?
$MustTreatServiceMessages public bool Must we treat the service messages or not?
$MustWriteSourceHeader public bool Do we have to write a file header in the output that is rendered to the browser ?
$Self public string Currently executing script name
$StartPageMain public string StartPage() main block replacement callback
$StartPagePost public string StartPage() post-block callback
$StartPagePre public string StartPage() pre-block callback
$StopPageMain public string StopPage() main block replacement callback
$StopPagePost public string StopPage() post-block callback
$StopPagePre public string StopPage() pre-block callback
$TemplateFromCookie public bool true indicates that the template can be set by cookie
$TemplateQueryURLOrCookie public bool true indicates that the template is taken from previously set cookie or from URL; false gets the template from the settings
$WithPerfCounters public boolean Should perf counters be included in this page
$aAcceptedLanguages public array Set of acceptable languages (from <LSAcceptedLanguages>...</LSAcceptedLanguages>)
$aArchipelagos public array An array of archipelagos that were treated to compose the page
$aBags public LSBag Array of bags
$aDeferredMarks public array Array of deferred marks (internal bags. cfr. CreateBag(), WriteBag(), RenderBag(), ...)
$aHeaderAcceptedLanguages public array Set of accepted languages as extracted from HTTP header
$aHref public array An array of hrefs resolved in the page
$aIslands public array Collection of islands to be inserted in the page
$aJS public array An array of .js source files to add dynamically
$aRedirections public array An array of redirections
$aSubstitutions public array An array of substitutions
$bBuffered public bool true if buffered output started; false otherwise
$bLanguageNoChange public bool Is the the language a fixed language? (default: no)
$bLastVisit public bool Last visit to be held or not (cookie formatted as FIRST VISIT;LAST VISIT;COUNT) (Additional doc (French): )
$bLoginIncluded public bool Is the login / logoff island already included in the page?
$bQualify public bool Must this page be parsed to extract meaningful words? false by default.
$bRevealStruct public bool false => Vae Soli! includes the islands; false => it lists the archipelagos that are to be included ... but does NOT include them
$iBrowserMaxDangerRating public int Maximum danger rating for browser (page won't load over this limit: range = -1 to 10)
$iCacheTTL public int Cache Time To Live expressed in seconds (0 = no cache)
$iDelay public int An execution delay before the page gets sent back (-1 by default = no execution delay)
$iEndTime public int Microtime value when we finished building the page
$iMailPort public int Mail port
$iPageDefTTL public int Cache TTL (expressed in seconds; 0 = no cache) of the page definition (not to be confused with $iCacheTTL)
$iStartTime public int Microtime value when we started building the page
$iSubstitutionsCacheTTL public int Cache used for the substitutions
$iTabIndex public int The tab index value that can be used by all forms
$oActiveIsland public LSIsland Active island (the island we're currently treating)
$oActiveNode public DOMNode Active node for the current page (located in the georama)
$oAltNode public DOMNode Substitution node for the current page (located in the georama)
$oCache public LSCache Cache object instantiated only if $this->iCacheTTL > 0
$oCurrentArchipelago public LSArchipelago The current archipelago (the one which is treated right now)
$oGeo public object Geo-coordinates object
$oNode public DOMNode Node of the current page (located in the georama)
$oRHeadfer public LSHttpResponseHeader HTTP Response Header
$oSrvMsg public LSServiceMessage The service message object
$oUser public LSUser Current user
$szAjaxServer public string URL for the Ajax server (analytics + Site Manager)
$szAutoLupdate public string Last update date and time (computed)
$szBookmarks public string Personal bookmarks for a user (stored in a cookie)
$szBrowserExclusionFilter public string Do we need to filter the browsers? (regex that disqualifies the browser)
$szCSSLinks public string Additional CSS Links (<head>...</head> section to be updated
$szCSSNonBlocking public string Links for a given page that must be inserted as non-blocking links */ public $szJSNonBlocking = null; /* {*property $szJSNonBlocking (string) JS scripts for a given page that must be inserted as non-blocking scripts */ public $aCSS = array(); /* {*property $aCSS (array) An array of .css source files to add dynamically (on top of $szCSSLinks and $szCSSNonBlocking )
$szCacheDir public string Directory where caches will be saved
$szCanonical public string Canonical page
$szCargo public string General purpose variable that is NOT used by the framework but that can be used by any routine. It is saved in a cookie and retrieved via cookies too.
$szCargo2 public string Second general purpose variable that is NOT used by the framework but that can be used by any routine. It is saved in a cookie and retrieved via cookies too.
$szCargo3 public string Third general purpose variable that is NOT used by the framework but that can be used by any routine. It is saved in a cookie and retrieved via cookies too.
$szContentSecurityPolicy public string CSP (, , , )
$szCreationDate public string Creation date and time of the page
$szDNSPrefetch public string Tokenized list of DNS to prefetch (additional doc (French): )
$szDescription public string Page description
$szExpirationHeader public string Expiration header for that page (use with caution for static pages)
$szGroup public string Group the page belong to
$szGuid public string Page GUID. All pages that can be backlinked should have a GUID
$szH1 public string H1 of a page (prior to html5 only 1 h1 is recommended)
$szHRef public string href="..." of the page (XML definition)
$szHomePage public string The homepage of the site (or of a series of pages)
$szInheritFrom public string Class of the page (inherit="")
$szKeyword public string Unique keyword (NOT USED AT THE MOMENT)
$szKeywords public string Page keywords (usually used in meta of the page). If using Dublin Core, it is better to separate keywords with a semicolon
$szLanguage public string Language of the page
$szLastVisit public string Last visit value ("FIRST VISIT;LAST VISIT;COUNT")
$szLupdate public string Last update date and time
$szMailCharset public string Mail charset
$szMailContentType public string Mail content-type
$szMailDomain public string Mail originating domain
$szMailFromEmail public string Email of the person that sends an email
$szMailFromName public string Name of the person that sends an email
$szMailHost public string Hostname
$szNextPage public string The page we must go to after THIS page (e.g. tutorial next page)
$szOnFailMsg public string An OnFail message that can positioned in the condition
$szOnLoad public string body "onload" clause
$szOnUnload public string body "onunload" clause
$szOutput public string The output buffer RIGHT BEFORE we will send it
$szParadeigma public string Paradeigma (sort of template) set for page
$szPath public string Path to code (e.g. Ajax routines may set this property as to store specific code in this path)
$szPreRendering public string Procedures files to load BEFORE islands must be rendered
$szPrefetch public string Tokenized list of pages to prefetch (additional doc (French): )
$szPrerender public string Tokenized list of pages to prerender (additional doc (French): )
$szPreviousPage public string Previous page (e.g. tutorial previous page)
$szProcedures public string Tokenized list of procedure files to load (',' or ';' separated)
$szRedirections public string A file of redirection instructions (XML format)
$szRegionSubtag public string Region (country) of the language (eg. 'fr-BE' )
$szRights public string Copyrights set on the page
$szRoot public string Site root
$szStartPage public string First page in a series of pages (e.g. tutorial first page)
$szStatsFile public string File that is to be used for stats
$szStatsLog public string Log file where analytics must be saved
$szSubTheme public string Graphical subtheme of the page
$szSubstitutions public string A tokenized string of substitutions files
$szTemplate public string The template that must be applied (precedence over $szParadeigma)
$szTheme public string Graphical theme of the page
$szTitle public string Title of the page (<head><title>…</title></head>)
$szWatch public string Watch folder (if files dropped in that folder, they are executed - e.g. <LSWatch><![CDATA[/batch/*.bat]]></LSWatch>; such files can, for example, contain service messages to be executed)
$szWebmaster public string Name of the webmaster of the site
Parent Properties (LSMotherNature)
NameType
Cargo NULL
GodStamp string
Shelter NULL
__LS_Consciousness NULL
cargo NULL
fPerf double
fPerfThreshold double
id NULL
oApp NULL
oTracer NULL
szNow NULL
szToday NULL
Methods
  1. __construct(): Class constructor
  2. AdaptBodyClause(): Adapts a clause of the ... tag
  3. AdaptBodyClausesIfNeeded(): Adapt the body tag with a "onload" and a "onunload" clause(s) if needed
  4. AddArchipelago(): Adds a new archipelago to the list of archipelagos treated for this page.
  5. AddCSS(): Add a .css link to the array of CSS links
  6. AddDeferredMark(): Add a deferred mark in the $this->aDeferredMarks array. Deferred marks are held by the page object as to be able to render them later on.
  7. AddJS(): Add a .js script to the array of .js scripts
  8. AddNonBlockingCSSAndJSAndPerformanceCountersIfNeeded(): Adds all necessary CSS and JS that must be queried in a non-blocking fashion.
  9. AddSubstitution(): Adds a substitution in the array of substitutions
  10. AddToBag(): Appends $szStr to the $szName bag. A bag is a container. Usually, it contains information to be placed in a web page that was composed at a time it cannot be decided to insert it in the HTML of the page.
  11. Agora(): Enters the agora, a place where all the islands can chat with each other. When they're finished, we shall render the global page (subsequent call to StopPage)
  12. CachePageIfNeeded(): Cache the page if needed (that is if the page requires caching + cache authorization given - NB: service messages can temporarily disable caching)
  13. CanPublish(): Determines if a node can be published. All filters supported by Vae Soli! are examined.
  14. ChangeHTMLHeadSectionIfNeeded(): Replaces various elements of the ... section based on a number of parameters and variables
  15. CheckRecursionLevelLimit(): Checks that the recursion level is not too high Language.
  16. CleanBag(): Cleans a given bag. A bag is a container. Usually, it contains information to be placed in a web page that was composed at a time it cannot be decided to insert it in the HTML of the page.
  17. ConvertCacheTTLToInt(): Transforms $szTTL into an integer (if we can) (cache is expressed in seconds)
  18. CreateBag(): Creates the $szName bag and stores it in a new cell of LSPage->$aBags
  19. CreateCacheIfNeeded(): Creates a cache if needed = only if $iCacheTTL > 0 AND cache allowed)
  20. EchoAllIslands(): Echo all islands found in this page
  21. FullLanguage(): Language and region setting (RFC 5646)
  22. GenerateDocType(): Generates the doctype of the page
  23. GetAcceptLanguages(): Extracts the languages set in the request header.
  24. GetCacheTTLIfAny(): Get the TTL of the cache (if any)
  25. GetCookie(): Get the value of a cookie or returns a default value if cookie NOT found
  26. GetLanguageFromRequestHeaders(): Extracts the language set in the request header.
  27. GetMsg(): Get a message from the application dictionary
  28. GetNonBlockingCSSHTML(): Get the HTML code that correspods to the list of CSS that must be added in a non-blocking fashion
  29. GetNonBlockingJSHTML(): Get the HTML code that correspods to the list of JS that must be added in a non-blocking fashion
  30. GetOBLevel(): Determines the output buffer level
  31. GetOBStatus(): Get status of ALL output buffers
  32. GetPageGeneralProperties(): Set Page title, page H1, page description, page keywords, and page rights
  33. GetPerformanceCountersCode(): Include the code needed for performance counters
  34. GetTagging(): Obtain page tagging
  35. GoToPage(): Redirection to the $szPage page
  36. IncludeAndCalculateStatsIfNeeded(): Include stats and calculate stats (only if needed)
  37. IncludeFiles(): Includes a set of resources (files)
  38. IncludeNugget(): Nugget inclusion by ID.
  39. IncludePostblockIfNeeded(): Include postblock if needed
  40. IncludePreblockIfNeeded(): Include preblock if needed
  41. IncludePrerenderingIfNeeded(): Include prerendering if needed
  42. IncludeTemplate(): Includes the template for the proper rendering of the page
  43. Init(): Page initialization
  44. InitSettings(): Initialize all page settings
  45. IsBot(): Checks if we have a bot at the other side
  46. Island(): Make all islands of this page emerge if they match a certain set of categories ($szCats )
  47. IsLoginIncluded(): Is the login form (via LSContentsLoginLogoff class) already included in the page?
  48. Land(): Reveals the contents of the archipelagos (and contained therein) whose categories do match the category
  49. Latin(): Inserts
  50. LoadSusbtitutions(): Loads all substitution files mentioned in $szFileList
  51. Login(): Login service that is relayed to the class that implements the login services.
  52. LoginLogoff(): Checks that the recursion level is not too high Language.
  53. Logoff(): Logoff of current user
  54. MayCache(): Determines whether the framework may cache information or not.
  55. NewIsland(): Creates a new $szClass island programmatically.
  56. Nugget(): Get the storage node of a nugget that matches the set of filters treated by the LSPublication class
  57. PlayBlock(): Plays a block of code (PRE or POST)
  58. PLink(): Returns a dummy link ('#'). This function is merely used when dealing with Vae Soli! paradeigmas. In such cases, the link should NOT be functional (turned to '#') whereas when a site is really generated, such links should be active.
  59. ProcessSubstitutionsIfNeeded(): Process all substitutions (if any) in the output buffer
  60. PTitle(): Returns a dummy title. This function is merely used when dealing with Vae Soli! paradeigmas. In such cases, the title should be set to the title which is passed to the method whereas when a site is really generated such titles should be set to the title of the active page.
  61. QualifyPageIfNeeded(): Qualifies page by extracting meaningful keywords
  62. QueryThemeCargoCargo2Cargo3BookmarksLanguage(): Positions internal properties: Theme, Cargo, Cargo2, Cargo3, Bookmarks, Language.
  63. QueryURLOrCookie(): Retrieves the value of a URL parameter or from a cookie
  64. Render(): Renders the page
  65. RenderBag(): Renders a given bag. A bag is a container. Usually, it contains information to be placed in a web page that was composed at a time it cannot be decided to insert it in the HTML of the page.
  66. RenderXML(): Parses and renders the XML contents of a page (definition held in the georama)
  67. ResumeServiceMessageIfNeeded(): Resume the processing of the service message (if needed)
  68. Self(): Returns the name of the running script (Self)
  69. Send(): Sends a mail
  70. SendHeader(): Sends additional headers in the response headers
  71. SendSamePage(): Sends the sam page
  72. SetContentSecurityPolicyHeaders(): Set the headers that are needed for Content Security
  73. SetLoginIncluded(): Set the status of the $bLoginIncluded property of the LSPage object.
  74. SetPerfThreshold(): Adjusts the performance threshold
  75. SetTemplateFromQueryURLOrCookie(): Set the template property via the query string or via a cookie
  76. StartContentNegotiationIfNeeded(): Starts content negotiation
  77. StartPage(): Start page rendering
  78. StartTracingOfStartPage(): Start tracing the StartPage() method
  79. Stats(): Stores analytics data
  80. StopPage(): Stops rendering the page
  81. StripWhiteSpacesIfNeeded(): Get rid of whitespaces if required cache authorization given - NB: service messages can temporarily disable caching)
  82. Substitute(): Plays all defined substitutions on $szStr
  83. SubstituteOne(): Get ONE substitution or a SET of substitutions
  84. SuggestToUseATemplateAndReturnDefaultHTML(): Displays a default HTML code that suggests to use a template. It also informs the developer how this operation needs to be performed and gives useful example.
  85. SuspendExecutionIfNeeded(): Suspend execution a number of microseconds if needed
  86. TreatBatch(): Treats a batch file
  87. TreatPagePropertiesSetInGeoramaIfAny(): Process the page properties that have been set in the Georama
  88. TreatRedirections(): Treats redirection patterns (redirections set in an external XML file)
  89. TreatServiceMessagesIfNeeded(): Process the Service Message if any
  90. TreatWatchDirIfNeeded(): Treat a watch dir if needed
  91. UseTemplate(): Use the template that was mentioned to build the page: full usage of $this->szTemplate (we really mean INCLUDE the template now)
  92. WhereHaveYouBeen(): Returns a list of URLs that the user has visited lately (called the trip)
  93. WriteBag(): Writes $szStr to the $szName bag. A bag is a container. Usually, it contains information to be placed in a web page that was composed at a time it cannot be decided to insert it in the HTML of the page.
  94. WriteExpirationHeaderIfAny(): Write expiration header if needed
  95. WriteOrRemoveSourceHeader(): Write the source header or remove it if not needed (there is anyway a placeholder that must be replaced!!!)
  96. XInclude(): Includes a resource
__construct(): Class constructor

[ back to method list ]

Notes
Note: Configuration items extracted from defaults.xml
  1. LSDoctype: doctype of the page
  2. LSIsStats: No stats by default
  3. LSStatsLog: Physical file where analytics must be stored
  4. LSTemplate: Template
  5. LSTemplateQueryURLOrCookie: Template available via cookie and/or URL ?
  6. LSTemplateFromCookie: Template available via cookie?
  7. LSParadeigma: Paradeigma (a sort of default template)
  8. LSLanguage: Language of the page
  9. LSAcceptLanguages: Languages that can be accepted by the page
  10. LSRegionSubtag: Region subtag (e.g. fr-BE ... BE)
  11. LSGuid: GUID of the page
  12. LSIsDebug: Page debugging?
  13. LSSubstitutions: File list that provide substitutions
  14. LSSubstitutionsCacheTTL: Cache used for the substitutions
  15. LSWebmaster: Name of the webmaster
  16. LSRevealStruct: Reveal the archipelagos to treat
  17. LSServiceMessages: Treat Service Messages?
  18. LSKeyword: Keyword for that page
  19. LSTheme: Theme of the page
  20. LSSubTheme: Conditional theme of the page
  21. LSCargo: Cargo member
  22. LSCargo2: Cargo2 member
  23. LSCargo3: Cargo3 member
  24. LSExpirationHeader: Expiration header
  25. LSPreRendering: Set of files that must be played before we render the islands
  26. LSMustWriteSourceHeader: Must we write a source header to the output?
  27. LSCacheTTL: Cache TTL
  28. LSCanonical: Set of files that must be played before we render the islands
  29. LSStartPage: Starting page of a set of linked pages
  30. LSPreviousPage: Previous page in a set of linked pages
  31. LSNextPage: Next page in a set of linked pages
  32. LSMustStripWhitespaces: Must we strip the white spaces before outputting something?
  33. LSWatch: Batch wildcard
  34. LSCSSLinks: Additional CSS links for a given page
  35. LSGeoLat: Latitude
  36. LSGeoLong: Longitude
  37. LSGeoPlace: Place
  38. LSGeoRegion: Region
  39. LSPerfThreshold: Performance threshold (before alert)
  40. LSMailFromName: Name of the person/robot that sends the email
  41. LSMailFromEmail: Email of the person/robot that sends the email
  42. LSMailPort: Port to be used
  43. LSMailContentType: Mail content-type
  44. LSMailCharset: Mail charset
  45. LSMailHost: Mail host
  46. LSMailDomain: Mail originating domain
  47. LSCacheDir: Directory where caches will be stored
  48. LSAjaxServer: Ajax server URL
  49. LSBrowserMaxDangerRating: Maximum danger that we accept for the browser (max danger by default)
  50. LSBrowserExclusionFilter: Regex that disqualifies browsers
  51. LSBrowserEmpty: Do we accept empty User Agents?
  52. LSCheckDoubleLogin: Must we check double login / logoff island inclusion?
  53. LSVisit: Must we update a last visit (regex: FIRST VISIT;LAST VISIT;COUNT)
  54. LSPrefetch: Must we prefetch pages?
  55. LSDNSPrefetch: Must we prefetch some DNS?
  56. LSPrerender: Must we prerender somes pages?
  57. LSContentSecurityPolicy: A Content Security Policy
  58. LSPath: A set of paths (; separated) where code files can be located (e.g. ajax routines )
  59. LSRedirections: A file that contains redirection instructions
Syntax

__construct( $oApplication )

Parameters
NameTypeDescription
$oApplication LSApplication LSApplication object
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED AdaptBodyClause(): Adapts a clause of the ... tag

[ back to method list ]

Created: 28-10-13 22:01

Since version 5.6.0004

Author

Syntax

AdaptBodyClause( $szPage,$szKeyword,$szValue )

Parameters
NameTypeDescription
$szPage string La page dont il faut modifier le tag . Par référence!!!
$szKeyword string L'attribut à modifier (e.g. 'onload')
$szValue string La nouvelle valeur de l'attribut (si l'attribut existait déjà , on ajoute la valeur)
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED AdaptBodyClausesIfNeeded(): Adapt the body tag with a "onload" and a "onunload" clause(s) if needed

[ back to method list ]

Created: 28-10-13 18:05

Since version 5.6.0004

Modified: 29-10-13 08:58

Author

Syntax

AdaptBodyClausesIfNeeded()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

See Also

AdaptBodyClause()

AddArchipelago(): Adds a new archipelago to the list of archipelagos treated for this page.

[ back to method list ]

Created: 28/04/2013 15:43

Since version 5.2.0001

Author

Syntax

AddArchipelago( $szID,$oNode )

Parameters
NameTypeDescription
$szID string ID of the archipelago
$oNode DOMNode DOM node of the georama where the archipelago is defined
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

AddCSS(): Add a .css link to the array of CSS links

[ back to method list ]

Syntax

AddCSS()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

AddDeferredMark(): Add a deferred mark in the $this->aDeferredMarks array. Deferred marks are held by the page object as to be able to render them later on.

[ back to method list ]

Syntax

AddDeferredMark()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

AddJS(): Add a .js script to the array of .js scripts

[ back to method list ]

Syntax

AddJS()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED AddNonBlockingCSSAndJSAndPerformanceCountersIfNeeded(): Adds all necessary CSS and JS that must be queried in a non-blocking fashion.

[ back to method list ]

Created: 17/11/2013 09:24

Since version 5.7.0000

Author

Syntax

AddNonBlockingCSSAndJSAndPerformanceCountersIfNeeded()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

AddSubstitution(): Adds a substitution in the array of substitutions

[ back to method list ]

Syntax

AddSubstitution( $szToBeReplaced,$szReplacement,$szPubDate,$szExpiry,$szDomain,$szIP,$szMedia,$bRegex,$szMobility )

Parameters
NameTypeDescription
$szToBeReplaced string The part that must be replaced
$szReplacement string The part that replaces $szToBeReplaced
$szPubDate string The publication date (start date & time for performing the substitution). YYYYMMDD[HHmmSS] format. Before that date, substitution will not take place.
$szExpiry string The expiry date (end date & time for performing the substitution). YYYYMMDD[HHmmSS] format. After that date, substitution will not take place.
$szDomain string Domain to take into account for the substitution
$szIP string IP address to take into account for the substitution
$szMedia string The media that must be satisfied for taking into account the substitution (iphone, ipad or ipod so far)
$bRegex unknown (bool ) Is this a regex substitution?
$szMobility string Mobility filter (if any). Optional.
Parameters Warning

AddSubstitution() uses 9 parameters whereas the suggested limit is 3.

Return

(int) Number of substitutions loaded

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

AddToBag(): Appends $szStr to the $szName bag. A bag is a container. Usually, it contains information to be placed in a web page that was composed at a time it cannot be decided to insert it in the HTML of the page.

[ back to method list ]

Syntax

AddToBag( $szName,$szStr )

Parameters
NameTypeDescription
$szName string Name of the bag
$szStr string Content to append to $szName
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

Agora(): Enters the agora, a place where all the islands can chat with each other. When they're finished, we shall render the global page (subsequent call to StopPage)

[ back to method list ]

Created: 28/04/2013 15:44

Since version 5.2.0001

Author

Syntax

Agora()

Parameters

None

Return

(int) LS_VAESOLI_SUCCESS_SUCCESS (0) in case if success; else error code as defined in LSApplication.errors.inc

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED CachePageIfNeeded(): Cache the page if needed (that is if the page requires caching + cache authorization given - NB: service messages can temporarily disable caching)

[ back to method list ]

Created: 28-10-13 17:49

Since version 5.6.0004

Author

Syntax

CachePageIfNeeded()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

CanPublish(): Determines if a node can be published. All filters supported by Vae Soli! are examined.

[ back to method list ]

Author

Syntax

CanPublish( $oNode )

Parameters
NameTypeDescription
$oNode DOMNode The node to be examined
Return

(int) LS_VAESOLI_SUCCESS_SUCCESS (0) in case of success; otherwise it indicates an error code as defined in LSApplication.errors.inc.

define( 'LS_VAESOLI_SUCCESS_SUCCESS',0  );

/**********************************************************************/
/* Errors and warnings in Vae Soli! are handled in ranges:            */
/*      - georama errors and warnings                                 */
/*      - page errors and warnings                                    */
/*      - dictionary errors and warnings                              */
/*      - ...                                                         */
/*                                                                    */
/* Errors are assigned negative values; warnings are assigned         */
/* positive values. A pure success has the hinge value of zero.       */
/*                                                                    */
/* +---------+---------------------------------------------------- +  */
/* |   ...   |                                                     |  */
/* +---------+-----------------------------------------------------+  */
/* |  20000  |    Dictionary warnings   (range = 10001 .. 20000)   |  */
/* +---------+-----------------------------------------------------+  */
/* |  10000  |       Page warnings      (range = 1001 .. 10000)    |  */
/* +---------+---------------------------------------------------- +  */
/* |   1000  |     Georama warnings     (range = 1 .. 1000)        |  */
/* +---------+---------------------------------------------------- +  */
/* |    0    |          Success                                    |  */
/* +---------+---------------------------------------------------- +  */
/* |  -1000  |      Georama errors      (range = -1 .. -1000)      |  */
/* +---------+---------------------------------------------------- +  */
/* | -10000  |       Page errors        (range = -1001 .. -10000)  |  */
/* +---------+-----------------------------------------------------+  */
/* | -20000  |    Dictionary errors     (range = -10001 .. -20000) |  */
/* +---------+---------------------------------------------------- +  */
/* |   ...   |                                                     |  */
/* +---------+---------------------------------------------------- +  */
/*                                                                    */
/**********************************************************************/


/* -------------------------------------------------------------------*/
/* Define generic errors and warnings (can happen in all ranges)      */
/* -------------------------------------------------------------------*/
define( 'LS_ERROR_CANNOT_CREATE_DOM'                    ,   4   );
define( 'LS_ERROR_CANNOT_CREATE_XPATH'                  ,   5   );

/* -------------------------------------------------------------------*/
/* Define the errors and warnings in the georama                      */
/* -------------------------------------------------------------------*/
define( 'LS_GEORAMA_BASE'                               ,1000                                                           );
    /* Warnings ----------------------------------------------------- */
    define( 'LS_GEORAMA_WARNINGS_BASE'                  ,LS_GEORAMA_BASE                                                );
        define( 'LS_GEORAMA_WARNING_DEFAULT_PAGE'       ,LS_GEORAMA_WARNINGS_BASE   -   1                               );
        define( 'LS_GEORAMA_WARNING_NO_PAGE_SETTINGS'   ,LS_GEORAMA_WARNINGS_BASE   -   2                               );
    /* Errors ------------------------------------------------------- */
    define( 'LS_GEORAMA_ERRORS_BASE'                        ,- LS_GEORAMA_BASE                                          );
        define( 'LS_GEORAMA_ERROR_GEORAMA_NOT_FOUND'        ,LS_GEORAMA_ERRORS_BASE     +   1                           );
        define( 'LS_GEORAMA_ERROR_DEFAULT_GEORAMA_NOT_FOUND',LS_GEORAMA_ERRORS_BASE     +   2                           );
        define( 'LS_GEORAMA_ERROR_INVALID_STRUCTURE'        ,LS_GEORAMA_ERRORS_BASE     +   3                           );
        define( 'LS_GEORAMA_ERROR_CANNOT_CREATE_DOM'        ,LS_GEORAMA_ERRORS_BASE     +   LS_ERROR_CANNOT_CREATE_DOM  );
        define( 'LS_GEORAMA_ERROR_CANNOT_CREATE_XPATH'      ,LS_GEORAMA_ERRORS_BASE     +   LS_ERROR_CANNOT_CREATE_XPATH);
        define( 'LS_GEORAMA_ERROR_INVALID_XML'              ,LS_GEORAMA_ERRORS_BASE     +   6                           );
        define( 'LS_GEORAMA_ERROR_CLASS_NOT_FOUND'          ,LS_GEORAMA_ERRORS_BASE     +   7                           );

/* -------------------------------------------------------------------*/
/* Define the errors and warnings in a page                           */
/* -------------------------------------------------------------------*/
define( 'LS_PAGE_BASE'                                  ,10000                                                          );
    /* Warnings ----------------------------------------------------- */
    define( 'LS_PAGE_WARNINGS_BASE'                     ,LS_PAGE_BASE );
        // future defines
    /* Errors ------------------------------------------------------- */
    define( 'LS_PAGE_ERRORS_BASE'                           ,- LS_PAGE_BASE                                             );
        define( 'LS_PAGE_ERROR_CANNOT_START_PAGE'           ,LS_PAGE_ERRORS_BASE        +   1    );
        define( 'LS_PAGE_ERROR_CANNOT_STOP_PAGE'            ,LS_PAGE_ERRORS_BASE        +   2    );
        define( 'LS_PAGE_ERROR_PAGE_NOT_FOUND'              ,LS_PAGE_ERRORS_BASE        +   3    );
        define( 'LS_PAGE_ERROR_CANNOT_CREATE_DOM'           ,LS_PAGE_ERRORS_BASE        +   LS_ERROR_CANNOT_CREATE_DOM  );
        define( 'LS_PAGE_ERROR_CANNOT_CREATE_XPATH'         ,LS_PAGE_ERRORS_BASE        +   LS_ERROR_CANNOT_CREATE_XPATH);
        define( 'LS_PAGE_ERROR_PUBDATE_NOT_REACHED'         ,LS_PAGE_ERRORS_BASE        +   5    );
        define( 'LS_PAGE_ERROR_PAGE_EXPIRED'                ,LS_PAGE_ERRORS_BASE        +   6    );
        define( 'LS_PAGE_ERROR_CONDITION_NOT_SATISFIED'     ,LS_PAGE_ERRORS_BASE        +   7    );
        define( 'LS_PAGE_ERROR_MEDIA_NOT_SATISFIED'         ,LS_PAGE_ERRORS_BASE        +   8    );
        define( 'LS_PAGE_ERROR_RECURRENCE_NOT_MET'          ,LS_PAGE_ERRORS_BASE        +   9    );
        define( 'LS_PAGE_ERROR_CANNOT_REVEAL_PAGE'          ,LS_PAGE_ERRORS_BASE        +  10    );
        define( 'LS_PAGE_ERROR_USER_NOT_MEMBER'             ,LS_PAGE_ERRORS_BASE        +  11    );
        define( 'LS_PAGE_ERROR_REFERER_NOT_SATISFIED'       ,LS_PAGE_ERRORS_BASE        +  12    );
        define( 'LS_PAGE_ERROR_PORT_NOT_SATISFIED'          ,LS_PAGE_ERRORS_BASE        +  13    );
        define( 'LS_PAGE_ERROR_CONNECTTIME_NOT_SATISFIED'   ,LS_PAGE_ERRORS_BASE        +  14    );
        define( 'LS_PAGE_ERROR_LOGINTIME_NOT_SATISFIED'     ,LS_PAGE_ERRORS_BASE        +  15    );
        define( 'LS_PAGE_ERROR_DATE_NOT_SATISFIED'          ,LS_PAGE_ERRORS_BASE        +  16    );
        define( 'LS_PAGE_ERROR_GET_NOT_SATISFIED'           ,LS_PAGE_ERRORS_BASE        +  17    );
        define( 'LS_PAGE_ERROR_POST_NOT_SATISFIED'          ,LS_PAGE_ERRORS_BASE        +  18    );
        define( 'LS_PAGE_ERROR_COOKIE_NOT_SATISFIED'        ,LS_PAGE_ERRORS_BASE        +  19    );
        define( 'LS_PAGE_ERROR_SERVER_NOT_SATISFIED'        ,LS_PAGE_ERRORS_BASE        +  20    );
        define( 'LS_PAGE_ERROR_RELATION_NOT_SATISFIED'      ,LS_PAGE_ERRORS_BASE        +  21    );
        define( 'LS_PAGE_ERROR_COUNTRY_NOT_SATISFIED'       ,LS_PAGE_ERRORS_BASE        +  22    );
        define( 'LS_PAGE_ERROR_BIRTHDAY_NOT_SATISFIED'      ,LS_PAGE_ERRORS_BASE        +  23    );
        define( 'LS_PAGE_ERROR_USERLANGUAGE_NOT_SATISFIED'  ,LS_PAGE_ERRORS_BASE        +  24    );
        define( 'LS_PAGE_ERROR_TRIP_NOT_SATISFIED'          ,LS_PAGE_ERRORS_BASE        +  25    );
        define( 'LS_PAGE_ERROR_OCCURRENCES_NOT_SATISFIED'   ,LS_PAGE_ERRORS_BASE        +  26    );
        define( 'LS_PAGE_ERROR_MOBILITY_NOT_SATISFIED'      ,LS_PAGE_ERRORS_BASE        +  27    );
        define( 'LS_PAGE_ERROR_DEVICE_NOT_SATISFIED'        ,LS_PAGE_ERRORS_BASE        +  28    );
        define( 'LS_PAGE_ERROR_MODEL_NOT_SATISFIED'         ,LS_PAGE_ERRORS_BASE        +  29    );
        define( 'LS_PAGE_ERROR_PAGE_NOT_SATISFIED'          ,LS_PAGE_ERRORS_BASE        +  30    );
        define( 'LS_PAGE_ERROR_LAND_NOT_SATISFIED'          ,LS_PAGE_ERROR_PAGE_NOT_SATISFIED    );
        define( 'LS_PAGE_ERROR_KEYWORD_NOT_SATISFIED'       ,LS_PAGE_ERRORS_BASE        +  31    );
        define( 'LS_PAGE_ERROR_RATING_NOT_SATISFIED'        ,LS_PAGE_ERRORS_BASE        +  32    );
        define( 'LS_PAGE_ERROR_GENDER_NOT_SATISFIED'        ,LS_PAGE_ERRORS_BASE        +  33    );

/* -------------------------------------------------------------------*/
/* Define the errors and warnings in a dictionary                     */
/* -------------------------------------------------------------------*/
define( 'LS_DICTIONARY_BASE'                                ,20000                                                          );
    /* Warnings ----------------------------------------------------- */
    define( 'LS_DICTIONARY_WARNINGS_BASE'                   ,LS_DICTIONARY_BASE                                             );
        // future defines
    /* Errors ------------------------------------------------------- */
    define( 'LS_DICTIONARY_ERRORS_BASE'                     ,- LS_DICTIONARY_BASE                                           );
        define( 'LS_DICTIONARY_ERROR_CANNOT_CREATE_DOM'     ,LS_DICTIONARY_ERRORS_BASE  +   LS_ERROR_CANNOT_CREATE_DOM      );
        define( 'LS_DICTIONARY_ERROR_CANNOT_CREATE_XPATH'   ,LS_DICTIONARY_ERRORS_BASE  +   LS_ERROR_CANNOT_CREATE_XPATH    );

/* -------------------------------------------------------------------*/
/* Define the errors and warnings in a documentation                  */
/* -------------------------------------------------------------------*/
define( 'LS_DOCUMENTATION_BASE'                             ,30000 );
    /* Warnings ----------------------------------------------------- */
    define( 'LS_DOCUMENTATION_WARNINGS_BASE'                ,LS_DOCUMENTATION_BASE );
        // future defines
    /* Errors ------------------------------------------------------- */
    define( 'LS_DOCUMENTATION_ERRORS_BASE'                  ,- LS_DOCUMENTATION_BASE );
        define( 'LS_DOCUMENTATION_ERROR_CANNOT_CREATE_OBJECT',LS_DOCUMENTATION_ERRORS_BASE   +   1  );
        define( 'LS_DOCUMENTATION_ERROR_CANNOT_CREATE_DOM'   ,LS_DOCUMENTATION_ERRORS_BASE   +   LS_ERROR_CANNOT_CREATE_DOM      );
        define( 'LS_DOCUMENTATION_ERROR_CANNOT_CREATE_XPATH' ,LS_DOCUMENTATION_ERRORS_BASE   +   LS_ERROR_CANNOT_CREATE_XPATH    );

/* ---------------------------------------------------------------------*/
/* Define the errors and warnings in a booking                          */
/* ---------------------------------------------------------------------*/
define( 'LS_BOOKING_BASE'                                   ,40000 );
    /* Warnings ----------------------------------------------------- */
    define( 'LS_BOOKING_WARNINGS_BASE'                      ,LS_BOOKING_BASE );
        // future defines
    /* Errors ------------------------------------------------------- */
    define( 'LS_BOOKING_ERRORS_BASE'                        ,- LS_BOOKING_BASE );
        define( 'LS_BOOKING_ERROR_NO_VALID_RESSOURCE_SPECIFIED' ,LS_BOOKING_ERRORS_BASE  +   1  );
        define( 'LS_BOOKING_ERROR_RESSOURCE_ARRAY_EMPTY'        ,LS_BOOKING_ERRORS_BASE  +   2  );
        define( 'LS_BOOKING_ERROR_RESSOURCE_STRING_EMPTY'       ,LS_BOOKING_ERRORS_BASE  +   3  );
        define( 'LS_BOOKING_ERROR_INVALID_DATE'                 ,LS_BOOKING_ERRORS_BASE  +   4  );
        define( 'LS_BOOKING_ERROR_INVALID_START_END_TIME'       ,LS_BOOKING_ERRORS_BASE  +   5  );
        define( 'LS_BOOKING_ERROR_BEFORE_START_BOUNDARY'        ,LS_BOOKING_ERRORS_BASE  +   6  );
        define( 'LS_BOOKING_ERROR_AFTER_END_BOUNDARY'           ,LS_BOOKING_ERRORS_BASE  +   7  );
        define( 'LS_BOOKING_ERROR_SLOT_ALREADY_BOOKED'          ,LS_BOOKING_ERRORS_BASE  +   8  );

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED ChangeHTMLHeadSectionIfNeeded(): Replaces various elements of the ... section based on a number of parameters and variables

[ back to method list ]

Created: 28-10-13 17:39

Since version 5.6.0004

Author

Abstract

Before we send the page back, we may have changes to carry. The changes we're after are the ones of the <head>...</head> section

Syntax

ChangeHTMLHeadSectionIfNeeded()

Parameters

None

Return

(int) Continuation upon exit

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

CleanBag(): Cleans a given bag. A bag is a container. Usually, it contains information to be placed in a web page that was composed at a time it cannot be decided to insert it in the HTML of the page.

[ back to method list ]

Syntax

CleanBag( $szName )

Parameters
NameTypeDescription
$szName string Name of the bag to be cleaned
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED ConvertCacheTTLToInt(): Transforms $szTTL into an integer (if we can) (cache is expressed in seconds)

[ back to method list ]

Created: 27-12-2013 17:53

Since version 5.8.0000

Author

Remark

$szTTL can possibly be a PHP expression in which case it gets evaluated and turned to an int (if not already an int)

Syntax

ConvertCacheTTLToInt( $szTTL )

Parameters
NameTypeDescription
$szTTL unknown
Return

(void) If $szTTL has been successfully turned into an int, then the $iCachetTTL of the page is updated with the int.

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

CreateBag(): Creates the $szName bag and stores it in a new cell of LSPage->$aBags

[ back to method list ]

Caution

If $szName is an existing bag, it is overwritten.

Abstract

A bag is a container. Usually, it contains information to be placed in a web page that was composed at a time it cannot be decided to insert it in the HTML of the page.

Syntax

CreateBag( $szName,$bDefer )

Parameters
NameTypeDescription
$szName string Name of the bag
$bDefer bool Optional deferred property of the bag. false by default.
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED CreateCacheIfNeeded(): Creates a cache if needed = only if $iCacheTTL > 0 AND cache allowed)

[ back to method list ]

Created: 27-12-2013 18:00

Since version 5.8.0000

Author

Warning

For $this->oCache to be a LSCache, a TTL must be mentioned for the current page and cache must be permitted (it is possible to overwrite this behavior thanks to some service messages that will then say "No, cache is not allowed" right now). On top of that, for the page to be successfully cached, it needs to bear a GUID: otherwise 2 pages with no GUID will share the same cache!

Syntax

CreateCacheIfNeeded()

Parameters

None

Return

(void) If cache required and permitted ... $this->oCache is an instance of LSCache

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED EchoAllIslands(): Echo all islands found in this page

[ back to method list ]

Created: 28-10-13 22:01

Since version 5.6.0004

Author

Syntax

EchoAllIslands()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

FullLanguage(): Language and region setting (RFC 5646)

[ back to method list ]

Author

Syntax

FullLanguage()

Parameters

None

Return

(string) Language, region setting (eg. 'fr-BE')

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

GenerateDocType(): Generates the doctype of the page

[ back to method list ]

Syntax

GenerateDocType( $szType )

Parameters
NameTypeDescription
$szType string doctype type. Optional. html5 by default
ValueDoctype
html-401-frame HTML 4.01 frameset
html-401-frameset HTML 4.01 frameset
html-401-strict HTML 4.01 strict
html-401-transitional HTML 4.01 transitional
html-401-trans HTML 4.01 transitional
html-401 HTML 4.01 transitional
html-401-short HTML 4.01 transitional (no DTD definition)
xhtml10 XHTML 1.0 strict
xhtml10-strict XHTML 1.0 strict
xhtml10-trans XHTML 1.0 transitional
xhtml10-transitional XHTML 1.0 transitional
xhtml10-frame XHTML 1.0 frameset
xhtml10-frameset XHTML 1.0 frameset
xhtml11 XHTML 1.1 (always strict !!!)
rdfa XHTML + RDFa 1.0
html5 HTML5
Return

(string) DOCTYPE instruction

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

GetAcceptLanguages(): Extracts the languages set in the request header.

[ back to method list ]

Credits

Jesse Skinner. Script modified but originally found at .

Remark

If the country of the current user is NOT determined when entering GetAcceptLanguages(), it is updated ($this->oUser->szCountry); if the language of the current user is NOT determined when entering GetAcceptLanguages(), it is updated ($this->oUser->szLanguages). Additional doc on this behavior can be obtained from the web site of Vae Soli!:

Docs

Additional doc: , , ,

Syntax

GetAcceptLanguages()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

See Also

GetLanguageFromRequestHeaders()

PROTECTED GetCacheTTLIfAny(): Get the TTL of the cache (if any)

[ back to method list ]

Created: 27-12-2013 13:57

Since version 5.8.0000

Author

Remark

If the MustCacheForBots property is set to true AND if we're facing a bot (all depending on our capability to detect crawlers/scrapers/bots/... in LSBrowser) then we shall cache the page here for ONE FULL DAY.

Syntax

GetCacheTTLIfAny()

Parameters

None

Return

(string) The TTL assigned to the cache (or null if not cache

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

GetCookie(): Get the value of a cookie or returns a default value if cookie NOT found

[ back to method list ]

Author

Syntax

GetCookie( $szName,$xDefault )

Parameters
NameTypeDescription
$szName string Cookie name
$xDefault mixed Default value (used if cookie not found)
Return

(mixed) A string with the value of the cookie is returned if the cookie was found; otherwise it returns $xDefault

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

GetLanguageFromRequestHeaders(): Extracts the language set in the request header.

[ back to method list ]

Warning

Only the first language of the Accept-Language header is considered.

Abstract

The Request Headers sent by the visitor's browser can contain Language that can be accepted:

User-Agent => string 'Opera/9.80 (Windows NT 6.1; WOW64) ...
Host => string 'www.mazuis.poc' (length=14)
Accept => string 'text/html, application/xml;q=0.9, application/xhtml+xml, image/png, ...
Accept-Language => string 'fr-BE,fr;q=0.9,en;q=0.8'
Accept-Encoding => string 'gzip, deflate'
Cookie => string 'PHPSESSID=...'
Cache-Control' => string 'no-cache'
Connection' => string 'Keep-Alive'

At the very same time, the default language of a page (or set of pages) can be defined in the configuration files of the site (defaults.xml ... with <LSLanguage><![CDATA[fr]]></LSLanguage> for example). Vae Soli! uses a special value of the <LSLanguage>...</LSLanguage> setting to retrieve the default language from the Accept-Language header of the HTTP request: <LSLanguage><![CDATA[accept]]></LSLanguage> Here's what the W3C says about the subject (:

The HTTP Accept-Language header was originally only intended to specify the user's language. However, since many applications need to know the locale of the user, common practice has used Accept- Language to determine this information. It is not a good idea to use the HTTP Accept-Language header alone to determine the locale of the user. If you use Accept-Language exclusively, you may handcuff the user into a set of choices not to his liking.

For a first contact, using the Accept-Language value to infer regional settings may be a good starting point, but be sure to allow them to change the language as needed and specify their cultural settings more exactly if necessary. Store the results in a database or a cookie for later visits.

Using the Accept-Language header is also a good starting point for determining the language of the user, rather than the locale, but even then you must know its limitations and give the user some way to override the assumptions you make. Many of the potential issues listed above apply here too.

Syntax

GetLanguageFromRequestHeaders( $szLanguage )

Parameters
NameTypeDescription
$szLanguage string The default language
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

GetMsg(): Get a message from the application dictionary

[ back to method list ]

Created: 30/10/2012 13:28

Since version 5.0.0010

Syntax

GetMsg( $szKey,$szDefault )

Parameters
NameTypeDescription
$szKey string Key to search for
$szDefault string Default value (if $szKey not found). Optional.
Return

(string) The message corresponding to $szKey

Example(s)
$szPrevMsg = $oPage->GetMsg( 'Previous' );
$szNextMsg = $oPage->GetMsg( 'Next'     );
Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED GetNonBlockingCSSHTML(): Get the HTML code that correspods to the list of CSS that must be added in a non-blocking fashion

[ back to method list ]

Created: 17/11/2013 13:11

Since version 5.7.0000

Author

Syntax

GetNonBlockingCSSHTML()

Parameters

None

Return

(string) HTML code that must be inserted

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED GetNonBlockingJSHTML(): Get the HTML code that correspods to the list of JS that must be added in a non-blocking fashion

[ back to method list ]

Created: 17/11/2013 13:12

Since version 5.7.0000

Author

Syntax

GetNonBlockingJSHTML()

Parameters

None

Return

(string) HTML code that must be inserted

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

GetOBLevel(): Determines the output buffer level

[ back to method list ]

Syntax

GetOBLevel()

Parameters

None

Return

(int) The Output Buffer level at the time this method was called.

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

GetOBStatus(): Get status of ALL output buffers

[ back to method list ]

Syntax

GetOBStatus()

Parameters

None

Return

(array) Same array as the one provided by ob_get_status()

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED GetPageGeneralProperties(): Set Page title, page H1, page description, page keywords, and page rights

[ back to method list ]

Created: 27-12-2013 13:57

Since version 5.8.0000

Author

Syntax

GetPageGeneralProperties()

Parameters

None

Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED GetPerformanceCountersCode(): Include the code needed for performance counters

[ back to method list ]

Created: 29-10-13 09:13

Since version 5.6.0004

Author

Syntax

GetPerformanceCountersCode()

Parameters

None

Return

(string) HTML code that corresponds to the performance counters inclusion or an empty string if there is no performance counter to add

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED GetTagging(): Obtain page tagging

[ back to method list ]

Syntax

GetTagging( $oNode )

Parameters
NameTypeDescription
$oNode DOMNode Current node
Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

GoToPage(): Redirection to the $szPage page

[ back to method list ]

Syntax

GoToPage( $szPage )

Parameters
NameTypeDescription
$szPage string Page to go to
Example(s)
$this->GoToPage( 'error.php' );
Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED IncludeAndCalculateStatsIfNeeded(): Include stats and calculate stats (only if needed)

[ back to method list ]

Created: 29-10-13 13:22

Since version 5.6.0004

Author

Syntax

IncludeAndCalculateStatsIfNeeded()

Parameters

None

Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

IncludeFiles(): Includes a set of resources (files)

[ back to method list ]

Author

Syntax

IncludeFiles( $szFileList,$szPreBlock,$szPostBlock,$bLangSensitive,$szType,$WithPagination,$iContentNo,$WithTOC,$aParams )

Parameters
NameTypeDescription
$szFileList string A list of resource to include (; tokenized)
$szPreBlock string Optional pre-block to play before each inclusion. null by default
$szPostBlock string Optional post-block to play before each inclusion. null by default
$bLangSensitive bool Language sensitive (language considered or not). true by default. if true each resource is appended the current language value (e.g. myfile_fr.php)
$szType string Incousion type ('include' or 'require'). 'include' by default.
$WithPagination bool true => include only 1 content per page false => include all contents (false by default)
$iContentNo int > 0 ... qualifies the content part; 0 by default
$WithTOC bool true to include a TOC (multi content); false if not. Optional. false by default
$aParams array Associative array of additional parameters
Parameters Warning

IncludeFiles() uses 9 parameters whereas the suggested limit is 3.

Return

(bool) true at least one content included; false otherwise.

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

IncludeNugget(): Nugget inclusion by ID.

[ back to method list ]

Abstract

A nugget is a content that can have variations. Variations are activated via filters, the ones used in LSPublication. For example, an image can be displayed as text in certain conditions. This is a perfect illustration of what a nugget can be: we call a nugget (e.g. "portfolio-image-map") and the conditions in which the nugget gets displayed as a high-resolution image or a low-density image are the responsibility of the nugget, possibly even displayed as pure text in specific conditions.

Syntax

IncludeNugget( $szID )

Parameters
NameTypeDescription
$szID string Unique ID of the nugget
Return

(void) No return provided (the nugget gets included in the page)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

See Also

Nugget()

PROTECTED IncludePostblockIfNeeded(): Include postblock if needed

[ back to method list ]

Syntax

IncludePostblockIfNeeded( $oNode )

Parameters
NameTypeDescription
$oNode DOMNode Current node
Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED IncludePreblockIfNeeded(): Include preblock if needed

[ back to method list ]

Syntax

IncludePreblockIfNeeded( $oNode )

Parameters
NameTypeDescription
$oNode DOMNode Current node
Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED IncludePrerenderingIfNeeded(): Include prerendering if needed

[ back to method list ]

Syntax

IncludePrerenderingIfNeeded()

Parameters

None

Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED IncludeTemplate(): Includes the template for the proper rendering of the page

[ back to method list ]

Syntax

IncludeTemplate( $szTemplate )

Parameters
NameTypeDescription
$szTemplate string Template to be used (a physical filename)
Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

Init(): Page initialization

[ back to method list ]

Syntax

Init()

Parameters

None

Return

(int) LS_VAESOLI_SUCCESS_SUCCESS (0) in case if success; else error code as defined in LSApplication.errors.inc

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED InitSettings(): Initialize all page settings

[ back to method list ]

Syntax

InitSettings( $szPage )

Parameters
NameTypeDescription
$szPage string Optional page name whose parameters must be retrieved and initialized. If null current script is assumed.
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

IsBot(): Checks if we have a bot at the other side

[ back to method list ]

Syntax

IsBot()

Parameters

None

Return

(bool) true if bot detected; false if not

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

Island(): Make all islands of this page emerge if they match a certain set of categories ($szCats )

[ back to method list ]

Syntax

Island( $szCats )

Parameters
NameTypeDescription
$szCats string Categories that can be accepted (tokenized string)
Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

IsLoginIncluded(): Is the login form (via LSContentsLoginLogoff class) already included in the page?

[ back to method list ]

Syntax

IsLoginIncluded()

Parameters

None

Return

(bool) true if a LSContentsLoginLogoff island has already been included in the page; false if not.

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

Land(): Reveals the contents of the archipelagos (and contained therein) whose categories do match the category

[ back to method list ]

Syntax

Land()

Alias

ImmerseArchipel(), EmergeArchipel(),ImmerseArchipelagos(), EmergeArchipelagos(),ImmerseArchipelagosAndIslands(), Archipelagos()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

Latin(): Inserts

[ back to method list ]

Syntax

Latin()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

LoadSusbtitutions(): Loads all substitution files mentioned in $szFileList

[ back to method list ]

Remark

A substitutions file is basically a dictionary:



value fr
value en
value nl


Syntax

LoadSusbtitutions( $szFileList )

Parameters
NameTypeDescription
$szFileList string A tokenized string of files to load (',' or ';' separated)
Return

(int) Number of substitutions loaded

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

Login(): Login service that is relayed to the class that implements the login services.

[ back to method list ]

Author

Docs

Syntax

Login( $szUserAccount,$szPassword )

Parameters
NameTypeDescription
$szUserAccount string User account
$szPassword string User password
Return

(bool) true if credentials OK; false if not.

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED LoginLogoff(): Checks that the recursion level is not too high Language.

[ back to method list ]

Syntax

LoginLogoff()

Parameters

None

Return

(bool) true if Login/Logoff successful; false if not

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

Logoff(): Logoff of current user

[ back to method list ]

Author

Syntax

Logoff()

Parameters

None

Return

(void) Current session is cleared

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

MayCache(): Determines whether the framework may cache information or not.

[ back to method list ]

Remark

Cache allowed or cache disallowed is merely driven by a Service Message ({cache:on} or {cache:off}). If the {cache:off} message is sent (requires an administrator to be logged) then the framework avoids all caching mechanisms. Useful for testing and debugging. The cache system is toggled off the time of the current session.

Docs

Syntax

MayCache()

Parameters

None

Return

(bool) true if Vae Soli! may cache; false if not

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

NewIsland(): Creates a new $szClass island programmatically.

[ back to method list ]

Author

Syntax

NewIsland( $szClass,$aAttributes,$szParams )

Parameters
NameTypeDescription
$szClass string Island class (e.g. 'LSContents')
$aAttributes array Optional list of attributes
$szParams string The list of parameters of the island (exact replica of what sits between the ... tags.
Return

(unknown) (LSIsland) an object of $szClass class or null if failure

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

Nugget(): Get the storage node of a nugget that matches the set of filters treated by the LSPublication class

[ back to method list ]

Abstract

A nugget is a content that can have variations. Variations are activated via filters, the ones used in LSPublication. For example, an image can be displayed as text in certain conditions. This is a perfect illustration of what a nugget can be: we call a nugget (e.g. "portfolio-image-map") and the conditions in which the nugget gets displayed as a high-resolution image or a low-density image are the responsibility of the nugget, possibly even displayed as pure text in specific conditions.

Syntax

Nugget( $szID )

Parameters
NameTypeDescription
$szID string Unique ID of the nugget
Return

(DOMNode) Storage node null if nugget NOT found

Example(s)
if ( ! is_null(  $oNode = $oPage->Nugget( 'coding-rules' ) ) )
{
    echo "Should focus on the following storage: " . $oNode->nodeValue;
}
Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

See Also

IncludeNugget()

PlayBlock(): Plays a block of code (PRE or POST)

[ back to method list ]

Author

Syntax

PlayBlock( $szCallback )

Parameters
NameTypeDescription
$szCallback string Optional name of the function to execute. null by default.
Return

(int) LS_VAESOLI_SUCCESS_SUCCESS (0) in case of success; otherwise it indicates an error code as defined in LSApplication.errors.inc

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PLink(): Returns a dummy link ('#'). This function is merely used when dealing with Vae Soli! paradeigmas. In such cases, the link should NOT be functional (turned to '#') whereas when a site is really generated, such links should be active.

[ back to method list ]

Syntax

PLink( $szLink )

Parameters
NameTypeDescription
$szLink string Optional link. Better if NOT empty.
Return

(string) The dummy link ('#')

Example(s)
<ol class="menu">
    <li><a href="<?php $this->PLink('/'); ?>">Homepage</a></li>
    <li><a href="<?php $this->PLink('/about.php'); ?>">About us</a></li>
    <li><a href="<?php $this->PLink('/contact.php'); ?>">Contact</a></li>
    <li><a href="<?php $this->PLink('/help.php'); ?>">Help</a></li>
</ol>
Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

See Also

PTitle(), PH1()

PROTECTED ProcessSubstitutionsIfNeeded(): Process all substitutions (if any) in the output buffer

[ back to method list ]

Created: 28-10-13 17:57

Since version 5.6.0004

Author

Syntax

ProcessSubstitutionsIfNeeded()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PTitle(): Returns a dummy title. This function is merely used when dealing with Vae Soli! paradeigmas. In such cases, the title should be set to the title which is passed to the method whereas when a site is really generated such titles should be set to the title of the active page.

[ back to method list ]

Syntax

PTitle( $szTitle )

Parameters
NameTypeDescription
$szTitle string Optional title. Better if NOT empty.
Return

(string) The title of the paradeigma

Example(s)
<ol class="menu">
    <li><a href="<?php $this->PLink('/'); ?>">Homepage</a></li>
    <li><a href="<?php $this->PLink('/about.php'); ?>">About us</a></li>
    <li><a href="<?php $this->PLink('/contact.php'); ?>">Contact</a></li>
    <li><a href="<?php $this->PLink('/help.php'); ?>">Help</a></li>
</ol>
Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

See Also

PTitle(), PH1()

PROTECTED QualifyPageIfNeeded(): Qualifies page by extracting meaningful keywords

[ back to method list ]

Author

Syntax

QualifyPageIfNeeded()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

QueryURLOrCookie(): Retrieves the value of a URL parameter or from a cookie

[ back to method list ]

Syntax

QueryURLOrCookie( $szName,$xDefault,$bCookie )

Parameters
NameTypeDescription
$szName string Parameter or cookie name
$xDefault string Default value to be returned if the parameter OR cookie cannot be found. If the cookie does not exist, it is created.
$bCookie bool Can we accept cookies?
Return

(string) The parameter and/or cookie value

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

Render(): Renders the page

[ back to method list ]

Author

Syntax

Render( $szPage )

Parameters
NameTypeDescription
$szPage string Page whose content must be rendered. Optional parameter.
Return

(int) LS_VAESOLI_SUCCESS_SUCCESS (0) in case if success; else error code as defined in LSApplication.errors.inc

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

RenderBag(): Renders a given bag. A bag is a container. Usually, it contains information to be placed in a web page that was composed at a time it cannot be decided to insert it in the HTML of the page.

[ back to method list ]

Syntax

RenderBag( $szName )

Parameters
NameTypeDescription
$szName string Name of the bag to be rendered
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED RenderXML(): Parses and renders the XML contents of a page (definition held in the georama)

[ back to method list ]

Syntax

RenderXML( $oNode )

Parameters
NameTypeDescription
$oNode DOMNode Page node
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED ResumeServiceMessageIfNeeded(): Resume the processing of the service message (if needed)

[ back to method list ]

Created: 28-10-13 17:39

Since version 5.6.0004

Author

Abstract

We're in the case of a 'Service Message' that could NOT be trated before we have completely built the page. Now, we need to resume the processing of this specific service message. A good example of such a case is with {body} service message : the page has to be built, then the content between <body>...</body> must be extracted and finally the result rendered.

Syntax

ResumeServiceMessageIfNeeded( $iContinuation )

Parameters
NameTypeDescription
$iContinuation unknown Continuation value on entry
Return

(int) Continuation upon exit

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

Self(): Returns the name of the running script (Self)

[ back to method list ]

Syntax

Self()

Parameters

None

Return

(string) Name of the running script or null if it cannot be determined.

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

See Also

Self

Send(): Sends a mail

[ back to method list ]

Syntax

Send( $szProtocol,$szTo,$szCC,$szBCC,$szSubject,$szBody )

Parameters
NameTypeDescription
$szProtocol string Protocol that must be used in the sending
$szTo string The recipient(s) of the email
$szCC string People in copy of the email
$szBCC string People in blind copy of the email
$szSubject string Subject of the email
$szBody string Body of the email
Parameters Warning

Send() uses 6 parameters whereas the suggested limit is 3.

Return

(bool) true if successful; false if failure

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

SendHeader(): Sends additional headers in the response headers

[ back to method list ]

Warning

Do not use this method. We do not remember exactly why it's here!

Syntax

SendHeader( $szPage )

Parameters
NameTypeDescription
$szPage string The code to add as a status $szMsg The message to associate to $szCode
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

SendSamePage(): Sends the sam page

[ back to method list ]

Syntax

SendSamePage()

Parameters

None

Return

(boolean)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED SetContentSecurityPolicyHeaders(): Set the headers that are needed for Content Security

[ back to method list ]

Since version 5.4.0002

Syntax

SetContentSecurityPolicyHeaders()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

SetLoginIncluded(): Set the status of the $bLoginIncluded property of the LSPage object.

[ back to method list ]

Syntax

SetLoginIncluded( $bStatus )

Parameters
NameTypeDescription
$bStatus bool Status to set
Return

(bool) true if a LSContentsLoginLogoff island has already been included in the page; false if not.

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED SetPerfThreshold(): Adjusts the performance threshold

[ back to method list ]

Created: 29-10-13 14:37

Since version 5.6.0004

Author

Syntax

SetPerfThreshold()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED SetTemplateFromQueryURLOrCookie(): Set the template property via the query string or via a cookie

[ back to method list ]

Syntax

SetTemplateFromQueryURLOrCookie()

Parameters

None

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED StartContentNegotiationIfNeeded(): Starts content negotiation

[ back to method list ]

Created: 27-12-2013 18:09

Since version 5.8.0000

Author

Remark

Content negotiation is ony triggered for XML content in which case 2 headers are added in the response we send

Syntax

StartContentNegotiationIfNeeded()

Parameters

None

Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED StartPage(): Start page rendering

[ back to method list ]

Syntax

StartPage( $szPage )

Parameters
NameTypeDescription
$szPage string Optional page id (e.g. '/index.php' )
Return

(int) Return code (LS_VAESOLI_SUCCESS_SUCCESS (=0) in case of success)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED StartTracingOfStartPage(): Start tracing the StartPage() method

[ back to method list ]

Created: 29-10-13 09:13

Since version 5.6.0004

Author

Syntax

StartTracingOfStartPage( $szPage,$iLevel )

Parameters
NameTypeDescription
$szPage string Page we're in (can be empty or null)
$iLevel int Current recursion level
Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

Stats(): Stores analytics data

[ back to method list ]

Syntax

Stats()

Parameters

None

Example(s)
$this->Stats();
Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

StopPage(): Stops rendering the page

[ back to method list ]

Modified: 17-11-2013 10:49

Author

Syntax

StopPage()

Parameters

None

Return

(int) Error code or LS_VAESOLI_SUCCESS_SUCCESS (0) upon success.

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED StripWhiteSpacesIfNeeded(): Get rid of whitespaces if required cache authorization given - NB: service messages can temporarily disable caching)

[ back to method list ]

Created: 28-10-13 17:49

Since version 5.6.0004

Author

Syntax

StripWhiteSpacesIfNeeded()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

Substitute(): Plays all defined substitutions on $szStr

[ back to method list ]

Author

Syntax

Substitute( $szStr,$bPHPEval )

Parameters
NameTypeDescription
$szStr string The string to process
$bPHPEval bool Optional evaluation of PHP code. false by default
Return

(string) $szStr with all substitutions treated

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

SubstituteOne(): Get ONE substitution or a SET of substitutions

[ back to method list ]

Created: 12/09/2013 07:48

Since version 5.5.0000

Author

Syntax

SubstituteOne( $xKey )

Parameters
NameTypeDescription
$xKey mixed String or array. If string, $xKey is the substitution key; if array, $xKey is treated as an array of keys to look for substitutions
Return

(mixed) String if $xKey is a string; Array if $xKey is an array;

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED SuggestToUseATemplateAndReturnDefaultHTML(): Displays a default HTML code that suggests to use a template. It also informs the developer how this operation needs to be performed and gives useful example.

[ back to method list ]

Syntax

SuggestToUseATemplateAndReturnDefaultHTML()

Parameters

None

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED SuspendExecutionIfNeeded(): Suspend execution a number of microseconds if needed

[ back to method list ]

Created: 17-11-2013 10:46

Since version 5.7.0000

Author

Syntax

SuspendExecutionIfNeeded()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED TreatBatch(): Treats a batch file

[ back to method list ]

Abstract

A "batch" file is a file that exposes commands to be executed by Vae Soli!

Syntax

TreatBatch( $szFile )

Parameters
NameTypeDescription
$szFile string Batch file to be treated
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED TreatPagePropertiesSetInGeoramaIfAny(): Process the page properties that have been set in the Georama

[ back to method list ]

Created: 27-12-2013 13:48

Since version 5.8.0000

Author

Abstract

The "Class" mechanism of the georama can use a special attributes where "new" or "existing" properties of the page can be set. Example:
<Land id="/login.php;/quitus/pages/login.php"
group="{main}"
creationdate="20110213"
lupdate="auto"
condition=""
properties="login_required=true" <<<--- HERE
inherit="public">
</Land>
When Vae Soli! will encounter such pattern, it will create a "login_required" property inside the current page and will assign the "true" value to it (ALWAYS a string)

Syntax

TreatPagePropertiesSetInGeoramaIfAny()

Parameters

None

Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

TreatRedirections(): Treats redirection patterns (redirections set in an external XML file)

[ back to method list ]

Since version 5.4.0002

Abstract

When redirections are needed for a site, would that be in whole or in part, it is easy to use a redirection instruction file. The redirection file is specified in the <LSRedirections> parameter usually set in the defaults.xml file with code similar to <LSRedirections><![CDATA[/../redirections.xml]]></LSRedirections>. The redirection file is parsed for the instructions that lead to 301 redirections. More doc on the concept is available in our samples: .

Docs

Additional doc and samples (French):

Syntax

TreatRedirections()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED TreatServiceMessagesIfNeeded(): Process the Service Message if any

[ back to method list ]

Created: 27-12-2013 13:35

Since version 5.8.0000

Author

Syntax

TreatServiceMessagesIfNeeded()

Parameters

None

Return

(int) Continuation scheme (LS_SM_NOT_TREATED_PAGE_GO by default)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED TreatWatchDirIfNeeded(): Treat a watch dir if needed

[ back to method list ]

Created: 27-12-2013 13:51

Since version 5.8.0000

Author

Abstract

Some files that are residing in a special directory may need to be executed. Each file is then relayed to TreatBatch()

Syntax

TreatWatchDirIfNeeded()

Parameters

None

Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

PROTECTED UseTemplate(): Use the template that was mentioned to build the page: full usage of $this->szTemplate (we really mean INCLUDE the template now)

[ back to method list ]

Syntax

UseTemplate( $szTagging )

Parameters
NameTypeDescription
$szTagging string Tagging
Return

(void)

Assertions

true === true successful

Unit Testing

1 assertions: 1 successful; 0 failed

WhereHaveYouBeen(): Returns a list of URLs that the user has visited lately (called the trip)

[ back to method list ]

Abstract

The trip is the list of pages that were visited by a user during a session (NOT inter-session). In Vae Soli! it is stored as an array in the LSApplication object. It resembles the following structure:

array (size=13)
  '/q/todos.php' =
    array (size=2)
      'count' = int 32
      'duration' = int 235288
      'description' = string 'TODO List de Lato Sensu Management' (length=26)
      'title' = string 'Quitus - TODO List - Lato Sensu Management' (length=31)
  '/q/invoices.php' =
    array (size=2)
      'count' = int 1
      'duration' = int 1135
      'description' = string 'Factures de Lato Sensu Management' (length=25)
      'title' = string 'Quitus - Factures - Lato Sensu Management' (length=30)
  '/help.php' =
    array (size=2)
      'count' = int 1
      'duration' = int 4
      'description' = string 'Cette page renseigne le visiteur sur un ensemble
                              de conventions d'utilisation du site de Lato
                              Sensu Management.' (length=103)
      'title' = string 'Aide - Lato Sensu Management' (length=20)

The WhereHaveYouBeen() method of the LSPage is used in the LSContentsBreadcrumb content island to display a breadcrumb that is merely a reminder of the pages the visitor has navigated to during her session. This is extrapolated from the trip.

Docs

See also the trip filter and the breadcrumb documentation: ,

Syntax

WhereHaveYouBeen()

Parameters

None

Return

(array) Array of pages stored in the trip

Example(s)
$aPages = $oPage->WhereHaveYouBeen();

if ( count( $aPages ) > 0 )
{
    echo "<h2>Where Have You Been? It's alright we know where you've been…</h2>";
    $szBreadCrumbs = '';

    foreach ( $aPages as $szPage )
    {
        $szBreadCrumbs .= "<a href=\"{$szPage}\">{$szPage}</a>, ";
    }
    $szBreadCrumbs = STR_Strin( $szBreadCrumbs,2 );
    echo $szBreadCrumbs;
}
Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

WriteBag(): Writes $szStr to the $szName bag. A bag is a container. Usually, it contains information to be placed in a web page that was composed at a time it cannot be decided to insert it in the HTML of the page.

[ back to method list ]

Syntax

WriteBag( $szName,$szStr )

Parameters
NameTypeDescription
$szName string Name of the bag
$szStr string Content to write to $szName
Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED WriteExpirationHeaderIfAny(): Write expiration header if needed

[ back to method list ]

Created: 04-02-2014 10:20

Since version 6.0.0002

Author

Syntax

WriteExpirationHeaderIfAny()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED WriteOrRemoveSourceHeader(): Write the source header or remove it if not needed (there is anyway a placeholder that must be replaced!!!)

[ back to method list ]

Created: 28-10-13 17:57

Since version 5.6.0004

Author

Syntax

WriteOrRemoveSourceHeader()

Parameters

None

Return

(void)

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

PROTECTED XInclude(): Includes a resource

[ back to method list ]

Syntax

XInclude( $szID )

TODO

Plus tard on devrait pouvoir inclure des fichiers distants et même d'avoir qqch de générique en ayant un ID qui correspondrait à qqch à inclure (dans un fichier texte de ressources par exemple : on a un ID qui dit "BLABLA", et dans le fichier texte, "BLABLA" correspond à "http://...")

Parameters
NameTypeDescription
$szID string The resource to include
Return

(boolean) true if the resource was succesfully included; false if not.

Unit Testing

WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}) or with GuideAssert() function calls in exec constructs ({*exec ... *}).

LSAnalyticsBrowserThis class is used in the Vae Soli! analytics to extract the info related to the browser used by a specific user logs

LSAnalyticsUserThis class is used in the Vae Soli! analytics to extract a user. All properties are then populated with the info found in the logs

Précédent Suivant