Niouzes

< Août 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-08-20 à 07:03:02

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) (20/08/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)

LSPublication.class.php

Generated by The Vae Soli! Documentor: Guide v. 1.3.0015 on 14-10-2013 13:08:45 (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/LSPublication.class.phpC:\websites\vaesoli.org\www\httpdocs\vaesoli\include\LSPublication.class.phpapplication/force-downloadC:\websites\vaesoli.org\www\httpdocs\vaesoli\include160540 bytes03/08/2013 23:27:5226/09/2013 16:46:5624/09/2013 16:22:37

Compliance

Assertions count: 0

Assertions successful: 0

Assertion failures: 0

Early Warning

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

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

Manifest Constants

LS_PUBLICATION_CLASS_PWH: Define "LS" Publication (filters on nodes) (Pat Was Here)

VAESOLI_PATH: Define the path where Vae Soli! is installed

VAESOLI_PLUGINS: Define the path where plugins are located

Sources required

LSV.functions.php: Framework functions

LSV.defines.inc: Framework constants

LSAutoload.php: Automatic class loading

LSVfc.class.php: Vae Soli! Foundation classes (such as LSMotherNature)

Classes

LSPublication extends LSMotherNatureChecks a set of conditions on a given DOMNode. If one of the conditions is NOT met, the publication of the node fails and the node does not get published.

Properties
NameVisibilityTypeDescription
$oEvaluator public LSEvalPHP PHP Evaluator
$oNode public DOMNode DOMNode to be examined
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. Can(): Checks that an XML node can be revealed or not by checking multiple filters
  3. GetThisFilter(): Gets the value of a given attribute (filter). If $oNode is a node of a page, parent attributes are examined as well.
  4. HasExpired(): Checks whether the expiry attribute of $oNode is OK
  5. IsAcceptLanguage(): Checks whether the accept-language set in the headers of the request do match a given value. The accept-languages options are supposed to be extracted at the early stages of LSPage.
  6. IsBirthOK(): Checks whether the $oNode matches the user-birthdate filter or not
  7. IsBrowser(): Checks whether the browser matches the expectations
  8. IsConditionSatisfied(): Determines if the 'condition' clause of a node is met or not
  9. IsCountryOK(): Checks whether the $oNode "user-country" attribute is OK or not
  10. IsDateOK(): Checks whether $oNode day attribute is OK
  11. IsGenderOK(): Checks whether the $oNode "user-gender" attribute is OK or not
  12. IsGetPostOK(): Checks whether the get or post attribute of $oNode is OK
  13. IsHandlheld(): Determines if the device is a handheld device by examining the User Agent string
  14. IsKeywordOK(): Checks whether the keywords of the node match the keywords of the page
  15. IsLangOK(): Checks whether the "lang" filter is satisfied
  16. IsMemberOf(): Checks whether the memberof attribute of $oNode is OK
  17. IsOccurrencesOK(): Checks whether the $oNode matches the "occurrences" filter or not. Occurences count is maintained in the current session under the following form $_SESSION['unique-content'][$szGUID].
  18. IsPageOK(): Checks whether the page of the node match the curent page
  19. IsProjection(): Determines if the visitor is ausing a projection device
  20. IsProperMedia(): Determines if the 'media' clause of a node is met or not
  21. IsRatingOK(): Checks whether the user rating matches the "rating" filter
  22. IsRefererOK(): Checks whether $oNode referer attribute is OK
  23. IsRelationOK(): Checks whether the relation attribute of $oNode is OK
  24. IsRobot(): Determines if the visitor is a robot (Google, Yahoo, ...) or not
  25. IsScreen(): Determines if the visitor is using a screen device
  26. IsTimeOK(): Checks whether $oNode connectTime or loginTime attribute is OK (compared to session)
  27. IsTripOK(): Checks whether the user has visited the pages mentioned in the "trip" filter
  28. IsVisitOK(): Checks whether the user has visited the pages mentioned in the "visit" filter. An exact match is required (the order of the visit matters). If the order is NOT important, please consider the "trip" filter instead.
__construct(): Class constructor

[ back to method list ]

Docs

Overview of all filters implemented in LSPublication (in French):

Syntax

__construct( $oNode )

Parameters
NameTypeDescription
$oNode DOMNode Node to be examined. Optional. null 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 ... *}).

Can(): Checks that an XML node can be revealed or not by checking multiple filters

[ back to method list ]

Syntax

Can( $oNode,$xCargo,$oGeorama,$oPage,$aFilters )

Parameters
NameTypeDescription
$oNode DOMNode Node to be examined.
$xCargo mixed Additional info to be passed to few checks
$oGeorama LSGeorama Application georama
$oPage LSPage Page object
$aFilters array Array of checks to be performed. Optional. By default, all checks are performed. Here's the list of possible filters
$aFilters['accept-language']
$aFilters['pubdate']
$aFilters['expiry']
$aFilters['memberof']
$aFilters['condition']
$aFilters['media']
$aFilters['referer']
$aFilters['port']
$aFilters['connectTime']
$aFilters['loginTime']
$aFilters['day']
$aFilters['date']
$aFilters['month']
$aFilters['year']
$aFilters['week']
$aFilters['get']
$aFilters['post']
$aFilters['cookie']
$aFilters['server']
$aFilters['relation']
$aFilters['trip']
$aFilters['occurrences']
$aFilters['mobility']
$aFilters['browsertype']
$aFilters['land']
$aFilters['keywords']
$aFilters['lang']
$aFilters['user-country']
$aFilters['user-birthdate']
$aFilters['user-rating']
$aFilters['user-gender']
$aFilters['visit']
For a given filter to be performed, the appropriate slot must exist in the array and must be evaluated to true
Parameters Warning

Can() uses 5 parameters whereas the suggested limit is 3.

Return

(bool) true if $oNode satisfies all filters; 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 ... *}).

GetThisFilter(): Gets the value of a given attribute (filter). If $oNode is a node of a page, parent attributes are examined as well.

[ back to method list ]

Syntax

GetThisFilter( $szAttr,$oNode,$oGeorama )

Parameters
NameTypeDescription
$szAttr string Attribute to extract
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. null by default
Return

(string) The value of the $szAttr attribute in the $oNode node. null if $szAttr attribute not found

Unit Testing

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

HasExpired(): Checks whether the expiry attribute of $oNode is OK

[ back to method list ]

Remark

The [c]expiry[/c] attribute mut respect the [c]YYYYMMDD[HH[mm[SS]]][/c] format

Syntax

HasExpired( $oNode,$oGeorama,$xCargo )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
$xCargo mixed Cargo parameter (do what you want). Optional. Null by default
Return

(bool) true if $oNode has expired; 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 ... *}).

IsAcceptLanguage(): Checks whether the accept-language set in the headers of the request do match a given value. The accept-languages options are supposed to be extracted at the early stages of LSPage.

[ back to method list ]

Created: 03/09/2013 22:19

Since version 5.4.0013

Modified: 04/03/2013 08:13

Author

Docs

Additional doc: , , ,

Syntax

IsAcceptLanguage( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if accept-language matches; 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 ... *}).

IsBirthOK(): Checks whether the $oNode matches the user-birthdate filter or not

[ back to method list ]

Author

Syntax

IsBirthOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. null by default
Return

(bool) true if user birthdate matches filter; false if not

Example(s)
<Island id="services" active="yes" class="LSContents"
    user-birthdate="19591118">
    <param name="storage"><![CDATA[/services.php]]></param>
</Island>

or

<Island id="services" active="yes" class="LSContents"
    user-birthdate="1959-11">
    <param name="storage"><![CDATA[/services.php]]></param>
</Island>

or

<Island id="services" active="yes" class="LSContents"
    user-birthdate="11-18">
    <param name="storage"><![CDATA[/services.php]]></param>
</Island>

or

<Island id="services" active="yes" class="LSContents"
    user-birthdate="d18">
    <param name="storage"><![CDATA[/services.php]]></param>
</Island>

or

<Island id="services" active="yes" class="LSContents"
    user-birthdate="m11">
    <param name="storage"><![CDATA[/services.php]]></param>
</Island>

or

<Island id="services" active="yes" class="LSContents"
    user-birthdate="y1959">
    <param name="storage"><![CDATA[/services.php]]></param>
</Island>

or

<Island id="services" active="yes" class="LSContents"
    user-birthdate="a+50">
    <param name="storage"><![CDATA[/services.php]]></param>
</Island>
Unit Testing

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

IsBrowser(): Checks whether the browser matches the expectations

[ back to method list ]

Since version 5.4.0013

Modified: 04/09/2013 08:07

Author

Syntax

IsBrowser( $szAttr,$oNode,$oGeorama )

Parameters
NameTypeDescription
$szAttr string The attribute to test. Possible values are: 'mobility' and 'browsertype'
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if browser OK; 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 ... *}).

IsConditionSatisfied(): Determines if the 'condition' clause of a node is met or not

[ back to method list ]

Syntax

IsConditionSatisfied( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if condition 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 ... *}).

IsCountryOK(): Checks whether the $oNode "user-country" attribute is OK or not

[ back to method list ]

Author

Syntax

IsCountryOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. null by default
Return

(bool) true if user-country matches filter; false if not

Example(s)
<Island id="services" active="yes" class="LSContents"
    user-country="FR;BE;UK">
    <param name="storage"><![CDATA[/services.php]]></param>
</Island>
Unit Testing

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

IsDateOK(): Checks whether $oNode day attribute is OK

[ back to method list ]

Author

Syntax

IsDateOK( $szAttr,$oNode,$oGeorama )

Parameters
NameTypeDescription
$szAttr string Date type to test ('day','date','week','month' or 'year') (szAttr for attribute)
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. null by default
Return

(bool) true if filter matches; false otherwise

Example(s)
<Island id="test" active="yes" xhtml="yes" day="1;3;5;7">
    <p>JOUR IMPAIR</p>
</Island>

or

<Island id="test" active="yes" xhtml="yes" month="1;3;5;7;9;11">
    <p>MOIS IMPAIR</p>
</Island>

or

<Island id="test" active="yes" xhtml="yes" week="30-50">
    <p>C'EST LA BONNE SEMAINE</p>
</Island>

or

<Island id="test" active="yes" xhtml="yes" year="2000-2010;2012">
    <p>C'EST LA BONNE ANNEE</p>
</Island>

<Island id="test" active="yes" xhtml="yes" date="15;eom">
    <p>C'EST LE 15 OU LE DERNIER JOUR DU MOIS</p>
</Island>
Unit Testing

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

IsGenderOK(): Checks whether the $oNode "user-gender" attribute is OK or not

[ back to method list ]

Author

Syntax

IsGenderOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. null by default
Return

(bool) true if user-gender matches filter; false if not

Example(s)
<Island id="female-products" active="yes" class="LSContents"
    user-gender="F;?">
    <param name="storage"><![CDATA[/female-shoes.php]]></param>
</Island>
Unit Testing

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

IsGetPostOK(): Checks whether the get or post attribute of $oNode is OK

[ back to method list ]

Remark

All attributes ('get', 'post', 'cookie' or 'server') do use the very same syntax

Syntax

IsGetPostOK( $szAttr,$oNode,$oGeorama )

Parameters
NameTypeDescription
$szAttr string 'get', 'post', 'cookie' or 'server'
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if get, post, cookie or server matches; false otherwise

Example(s)
<!-- This island will be shown if the query string contains
     the "lang" parameter and if it has one of the following
     values: fr, nl or en -->
<Island id="whatever" active="yes" class="LSContents"
    get="lang$fr;nl;en">
    <param name="storage"><![CDATA[/good-language.php]]></param>
</Island>

<!-- This island will be shown if the query string contains
     the "lang" parameter and if is value is NOT fr -->
<Island id="whatever" active="yes" class="LSContents"
    get="lang!=fr">
    <param name="storage"><![CDATA[/good-language.php]]></param>
</Island>

<!-- This island will be shown if the query string contains
     the "date" parameter and if is value is bigger or equal to
     "20130515" -->
<Island id="whatever" active="yes" class="LSContents"
    get="date+=20130515">
    <param name="storage"><![CDATA[/good-language.php]]></param>
</Island>

<!-- This island will be shown if the query string contains
     the "date" parameter and if is value is lower or equal to
     "20130515" -->
<Island id="whatever" active="yes" class="LSContents"
    get="date-=20130515">
    <param name="storage"><![CDATA[/good-language.php]]></param>
</Island>

<!-- This island will be shown if the query string contains
     the "theme" parameter and if is value is equal to "white" -->
<Island id="whatever" active="yes" class="LSContents"
    get="theme=white">
    <param name="storage"><![CDATA[/snow.php]]></param>
</Island>

<!-- This island will be shown if the query string contains
     the "xml" parameter -->
<Island id="whatever" active="yes" class="LSContents"
    get="xml">
    <param name="storage"><![CDATA[/xml-return.php]]></param>
</Island>

<!-- This island will be shown if the query string does NOT contain
     the "xml" parameter -->
<Island id="whatever" active="yes" class="LSContents"
    get="!xml">
    <param name="storage"><![CDATA[/plain-text.php]]></param>
</Island>

<!-- This island will be shown if a post variable named "xml" exists -->
<Island id="whatever" active="yes" class="LSContents"
    post="xml">
    <param name="storage"><![CDATA[/save-variables.php]]></param>
</Island>
Unit Testing

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

PROTECTED IsHandlheld(): Determines if the device is a handheld device by examining the User Agent string

[ back to method list ]

Syntax

IsHandlheld( $szBrowser )

Parameters
NameTypeDescription
$szBrowser string User Agent string. Optional. null by default in which case the method determines automatically
Return

(bool) true if handheld; 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 ... *}).

IsKeywordOK(): Checks whether the keywords of the node match the keywords of the page

[ back to method list ]

Syntax

IsKeywordOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if keyword found; 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 ... *}).

IsLangOK(): Checks whether the "lang" filter is satisfied

[ back to method list ]

Syntax

IsLangOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if language matches; false if not

Example(s)
<Island id="services" active="yes" class="LSContents"
    lang="fr">
    <param name="storage"><![CDATA[/services-fr.php]]></param>
</Island>
Unit Testing

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

IsMemberOf(): Checks whether the memberof attribute of $oNode is OK

[ back to method list ]

Syntax

IsMemberOf( $oNode,$oGeorama,$szGroups )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
$szGroups string Groups that satisfy the clause. Optional. Null by default
Return

(bool) true if user is part of $szGroups; false if not

Example(s)
<!-- This island will be shown to users belonging to one
     of the following groups: admin, quitus, beta-testers -->
<Island id="admin" active="yes" class="LSContents"
    memberof="admin;quitus;beta-testers">
    <param name="storage"><![CDATA[/some-secret.php]]></param>
</Island>
Unit Testing

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

IsOccurrencesOK(): Checks whether the $oNode matches the "occurrences" filter or not. Occurences count is maintained in the current session under the following form $_SESSION['unique-content'][$szGUID].

[ back to method list ]

Author

Remark

For the "occurrences" filter to work, the $oNode node MUST have a [c]guid[/c] attribute. Therefore, the "occurrences" filter may not work on pages (<Land>…</Land> (unless you have defined this attribute yourself ... which is NOT recommended though).

Syntax

IsOccurrencesOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. null by default
Return

(bool) true if occurrences matches filter; 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 ... *}).

IsPageOK(): Checks whether the page of the node match the curent page

[ back to method list ]

Syntax

IsPageOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if page OK; 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 ... *}).

PROTECTED IsProjection(): Determines if the visitor is ausing a projection device

[ back to method list ]

Warning

This method always returns [c]true[/c]

Syntax

IsProjection( $szBrowser )

Parameters
NameTypeDescription
$szBrowser string User Agent string. Optional. null by default in which case the method determines automatically
Return

(bool) true if robot; 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 ... *}).

IsProperMedia(): Determines if the 'media' clause of a node is met or not

[ back to method list ]

Syntax

IsProperMedia( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if media 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 ... *}).

IsRatingOK(): Checks whether the user rating matches the "rating" filter

[ back to method list ]

Syntax

IsRatingOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if rating matches; false if not

Example(s)
<Island id="services" active="yes" class="LSContents"
    user-rating="A,B">
    <param name="storage"><![CDATA[/services.php]]></param>
</Island>
Unit Testing

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

IsRefererOK(): Checks whether $oNode referer attribute is OK

[ back to method list ]

Syntax

IsRefererOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if referer OK; 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 ... *}).

IsRelationOK(): Checks whether the relation attribute of $oNode is OK

[ back to method list ]

Remark

Relations is a tokenized string such as "usr;cus;sup;rel;mem;...". What the [c]IsRelationOK()[/c] method does is to check whether the current user has one of the relations we can accept to reveal some content (e.g. show this content to "members" only)

Syntax

IsRelationOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if user satisfies a valid relation; false if not

Example(s)
<!-- This island will be shown to users that entertain a
     "member" relation -->
<Island id="admin" active="yes" class="LSContents"
    relation="mem">
    <param name="storage"><![CDATA[/members-only.php]]></param>
</Island>
Unit Testing

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

PROTECTED IsRobot(): Determines if the visitor is a robot (Google, Yahoo, ...) or not

[ back to method list ]

Syntax

IsRobot( $szBrowser )

Parameters
NameTypeDescription
$szBrowser string User Agent string. Optional. null by default in which case the method determines automatically
Return

(bool) true if robot; 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 IsScreen(): Determines if the visitor is using a screen device

[ back to method list ]

Warning

This method always returns [c]true[/c]

Syntax

IsScreen( $szBrowser )

Parameters
NameTypeDescription
$szBrowser string User Agent string. Optional. null by default in which case the method determines automatically
Return

(bool) true if robot; 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 ... *}).

IsTimeOK(): Checks whether $oNode connectTime or loginTime attribute is OK (compared to session)

[ back to method list ]

Syntax

IsTimeOK( $szType,$oNode,$oGeorama )

Parameters
NameTypeDescription
$szType string Time type to test ('connect' or 'login')
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if connectTime|loginTime >= the one mentioned in the node; false otherwise

Example(s)
<!-- This island will be shown to people that stayed 3 minutes or more
     on our web site: they will have a chance to participate to our
     contest -->
<Island id="reward" active="yes" class="LSContents"
    connectTime="+=180">
    <param name="storage"><![CDATA[/contest.php]]></param>
</Island>

<!-- This island will be shown to people that stayed less than
     3 minutes on our web site: they are invited to stay longer
     to have a chance to participate to our contest -->
<Island id="incentive" active="yes" class="LSContents"
    connectTime="-180">
    <param name="storage"><![CDATA[/stay-a-bit-more-for-contest.php]]></param>
</Island>

<!-- This island will be shown to people that didn't login yet -->
<Island id="login-invitation" active="yes" class="LSContents"
    loginTime="0">
    <param name="storage"><![CDATA[/please-login.php]]></param>
</Island>
Unit Testing

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

IsTripOK(): Checks whether the user has visited the pages mentioned in the "trip" filter

[ back to method list ]

Syntax

IsTripOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if trip OK; false if not

Example(s)

Unit Testing

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

IsVisitOK(): Checks whether the user has visited the pages mentioned in the "visit" filter. An exact match is required (the order of the visit matters). If the order is NOT important, please consider the "trip" filter instead.

[ back to method list ]

Syntax

IsVisitOK( $oNode,$oGeorama )

Parameters
NameTypeDescription
$oNode DOMNode Node to examine
$oGeorama LSGeorama Georama object. Optional. Null by default
Return

(bool) true if visit OK; false if not

Example(s)
<Island id="visit-thanks" xhtml="yes" 
visit="/order.php;/help.php;/legal.php;/order.php;/help.php">
    <div>
        <p>Do you need any help? Call support staff at any time!</p>
    </div>
</Island>
Unit Testing

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

Précédent Suivant