Niouzes

< Octobre 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-10-14 à 17:13:57

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) (14/10/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)

LSSys.functions.php

Generated by The Vae Soli! Documentor: Guide v. 1.3.0018 on 01-04-2015 16:19:55 (DD-MM-YYYY HH:mm:SS). This documentation is built with Vae Soli! functions and classes!

The download page of Vae Soli! contains all sources of the framework.

Additional samples are available on the samples page of Vae Soli!.

File Properties

C:\websites\vaesoli.org\www\httpdocs/vaesoli/include/LSSys.functions.phpC:\websites\vaesoli.org\www\httpdocs\vaesoli\include\LSSys.functions.phpapplication/force-downloadC:\websites\vaesoli.org\www\httpdocs\vaesoli\include9869 bytes03/08/2013 23:27:5326/09/2013 16:46:5622/09/2013 09:01:15

Compliance

Assertions count: 3

Assertions successful: 2

Assertion failures: 1

0001 ... <?php
0002 ... /**************************************************************************/
0003 ... /** {{{*fheader
0004 ...     {*file                  LSSys.functions.php *}
0005 ...     {*purpose               Miscellaneous system functions (all purpose) *}
0006 ...     {*author                 *}
0007 ...     {*company               Lato Sensu Management[br]
0008 ...                             Rue Bois des Mazuis, 47[br]
0009 ...                             5070 Vitrival[br]
0010 ...                             Belgium (BE)[br]
0011 ...                             http://www.latosensu.be[br]
0012 ...                             Vae Soli! : http://www.vaesoli.org *}
0013 ...     {*cdate                 10/09/2012 - 18:46 *}
0014 ...     {*mdate                 auto *}
0015 ...     {*license               [url]http://creativecommons.org/licenses/by-sa/2.0/be/[url][br]
0016 ... 
0017 ...                             To obtain detailed information about the license
0018 ...                             terms, please head to the full license text
0019 ...                             available in the [file]LSCopyright.php[/file] file *}
0020 ... 
0021 ...     ------------------------------------------------------------------------
0022 ...     Changes History:
0023 ...     ------------------------------------------------------------------------
0024 ... 
0025 ...     {*chist
0026 ...         {*mdate 10/09/2012 *}
0027 ...         {*v 5.0.0006 *}
0028 ...         {*desc              Original creation *}
0029 ...     *}
0030 ...     *}}} */
0031 ... /**************************************************************************/
0032 ... if ( ! defined( 'VAESOLI_PATH' ) )                                  /* If the path is not defined yet */
0033 ... {
0034 ...     /* {*define (VAESOLI_PATH)  Define the path where Vae Soli! is installed *} */
0035 ...     define( 'VAESOLI_PATH',__DIR__ );
0036 ... }   /* if ( ! defined( 'VAESOLI_PATH' ) ) */
0037 ... 
0038 ... if ( ! defined( 'VAESOLI_PLUGINS' ) )                               /* If the path is not defined yet */
0039 ... {
0040 ...     /* {*define (VAESOLI_PLUGINS)  Define the path where plugins are located *} */
0041 ...     define( 'VAESOLI_PLUGINS',VAESOLI_PATH . '/../plugins' );
0042 ... }   /* if ( ! defined( 'VAESOLI_PLUGINS' ) ) */
0043 ... 
0044 ... /* ====================================================================== */
0045 ... /** {{*SYS_IsInternet( [$szHost,[$iPort]] )=
0046 ... 
0047 ...     Determines if there is an internet access
0048 ... 
0049 ...     {*params
0050 ...         $szHost (string)    Host to test for access. Optional. 
0051 ...                             [c]www.google.com[/c] by default
0052 ...         $iPort  (int)       Port to test for access. Optional.
0053 ...                             [c]80[/c] by default
0054 ...     *}
0055 ... 
0056 ...     {*return
0057 ...         (bool)          [c]true[/c] if Internet access found; 
0058 ...                         [c]false[/c] if not
0059 ...     *}
0060 ... 
0061 ...     {*example
0062 ...         if ( SYS_IsInternet() )
0063 ...         {
0064 ...             $oMail = new LSMail();
0065 ... 
0066 ...             $oMail->szHost          = ...;
0067 ...             $oMail->iPort           = ...;
0068 ...             $oMail->szMailType      = ...;
0069 ...             $oMail->szCharset       = ...;
0070 ...             $oMail->szDomain        = ...;
0071 ...             $oMail->iPriority       = ...;
0072 ...             $oMail->szFromName      = ...;
0073 ...             $oMail->szFromEmail     = ...;
0074 ...             $oMail->szTo            = ...;
0075 ...             $oMail->szCC            = ...;
0076 ...             $oMail->szBCC           = ...;
0077 ...             $oMail->szSubject       = ...;
0078 ...             $oMail->szBody          = ...;
0079 ...             $oMail->aAttachments    = ...;
0080 ... 
0081 ...             $oMail->Send( ... );
0082 ...         }
0083 ...     *}
0084 ... 
0085 ...     {*assert
0086 ...         MISC_CastString( SYS_IsInternet( 'localhost' ) ) === 'true'
0087 ...     *}
0088 ... 
0089 ...     *}}
0090 ...  */
0091 ... /* ====================================================================== */
0092 ... function SYS_IsInternet( $szHost = 'www.google.com',$iPort = 80 )
0093 ... /*-------------------------------------------------------------*/
0094 ... {
0095 ...     $bRetVal    = false;                                            /* Default return value (logical false) */
0096 ... 
0097 ...     if( $fp = @fsockopen( $szHost,$iPort ) )                        /* Open socket successful? */
0098 ...     {
0099 ...         $bRetVal = true;                                            /* Ready to return a true */
0100 ...         fclose( $fp );                                              /* Close file pointer */
0101 ...     }   /* if( $fp = @fsockopen( $szHost,$iPort ) ) */
0102 ...     
0103 ...     return ( $bRetVal );                                            /* Return result to caller */
0104 ... }  /* End of function SYS_IsInternet() ====================================== */
0105 ... 
0106 ... /* ====================================================================== */
0107 ... /** {{*SYS_IsDomain( $szHost )=
0108 ... 
0109 ...     Determines if a host exists
0110 ... 
0111 ...     {*params
0112 ...         $szHost (string)    Host to test for existance.
0113 ...     *}
0114 ... 
0115 ...     {*return
0116 ...         (bool)          true if $szHost exists; false if not
0117 ...     *}
0118 ... 
0119 ...     {*cdate 02/01/2013 17:34 *}
0120 ...     {*version 5.0.0011 *}
0121 ... 
0122 ...     {*warning
0123 ...         This function does NOT work yet
0124 ...     *}
0125 ... 
0126 ...     {*example
0127 ...     *}
0128 ... 
0129 ...     {*assert
0130 ...         MISC_CastString( SYS_IsDomain( 'localhost' ) ) === 'true'
0131 ...     *}
0132 ... 
0133 ...     {*assert
0134 ...         SYS_IsDomain( 'google.com' ) === true
0135 ...     *}
0136 ... 
0137 ...     {*todo
0138 ...         Continue to test this new function with nslookup
0139 ...     *}
0140 ... 
0141 ...     *}}
0142 ...  */
0143 ... /* ====================================================================== */
0144 ... function SYS_IsDomain( $szHost )
0145 ... /*----------------------------*/
0146 ... {
0147 ...     $bRetVal    = false;                                            /* Default return value (logical false) */
0148 ... 
0149 ...     if ( function_exists( 'checkdnsrr' ) )                          /* If function found */
0150 ...     {
0151 ...         //echo "<p>Ben la fonction existe!!!";
0152 ...         $bRetVal = checkdnsrr( $szHost );                           /* Check DNS records */
0153 ...     }
0154 ...     else
0155 ...     {
0156 ...         //echo "<p>Execution requested";
0157 ...         exec( "nslookup {$szHost}",$szRetVal );
0158 ...         echo $szRetVal;
0159 ...     }
0160 ...     
0161 ...     return ( $bRetVal );                                            /* Return result to caller */
0162 ... }  /* End of function SYS_IsDomain() */
0163 ... /* ====================================================================== */
0164 ... 
0165 ... /* ====================================================================== */
0166 ... /** {{*SYS_IsPortOK( $xPort )=
0167 ... 
0168 ...     Determines if current port (e.g. 80) corresponds to $xPort
0169 ... 
0170 ...     {*params
0171 ...         $xPort  (mixed) Port to check. Can be a string or an int.
0172 ...     *}
0173 ... 
0174 ...     {*return
0175 ...         (bool)  true if current port matches $xPort
0176 ...     *}
0177 ... 
0178 ...     {*example
0179 ...         // Example #1
0180 ...         if ( SYS_IsPortOK( '80' ) )
0181 ...         {
0182 ...             echo "We're OK to work on port 80";
0183 ...         }
0184 ... 
0185 ...         // Example #2
0186 ...         if ( SYS_IsPortOK( 80 ) )
0187 ...         {
0188 ...             echo "We're OK to work on port 80";
0189 ...         }
0190 ...     *}
0191 ...     *}}
0192 ...  */
0193 ... /* ====================================================================== */
0194 ... function SYS_IsPortOK( $xPort )
0195 ... /*----------------------------*/
0196 ... {
0197 ...     $bRetVal    = false;                                            /* Default return value (logical false) */
0198 ... 
0199 ...     if ( is_int( $xPort ) || ! STR_Empty( $xPort ) )                /* If 'port' attribute mentioned */
0200 ...     {
0201 ...         $iCurrentPort = 80;                                         /* Default port number */
0202 ... 
0203 ...         if     ( isset( $_SERVER['SERVER_PORT'] ) )
0204 ...         {
0205 ...             $iCurrentPort = (int) $_SERVER['SERVER_PORT'];
0206 ...         }
0207 ...         elseif ( isset( $_SERVER['HTTP_HOST'] ) )
0208 ...         {
0209 ...             $iCurrentPort = parse_url( $_SERVER['HTTP_HOST'],PHP_URL_PORT );
0210 ...         }
0211 ...         elseif ( isset( $_SERVER['HTTP_REFERER'] ) )
0212 ...         {
0213 ...             $iCurrentPort = parse_url( $_SERVER['HTTP_REFERER'],PHP_URL_PORT );
0214 ...         }
0215 ... 
0216 ...         $szPort = (string) $xPort;                                  /* Make it a string */
0217 ... 
0218 ...         if ( preg_match( '/\A\$(\d+)/',$szPort,$aMatch ) )          /* Match a list of values */
0219 ...         {
0220 ...             $aValues = explode( ',',substr( $szPort,1 ) );
0221 ...             $bRetVal = in_array( $iCurrentPort,$aValues );
0222 ...         }
0223 ...         elseif ( preg_match( '/\A!={0,2}(?P<port>\d+)/',$szPort,$aMatch ) ) /* Check unequality */
0224 ...         {
0225 ...             $bRetVal = ( $iCurrentPort !== (int) $aMatch['port'] ); /* If port OK */
0226 ...         }
0227 ...         elseif ( preg_match( '/\A(&gt;|>)=(?P<port>\d+)/',$szPort,$aMatch ) ) /* Check greater or equal */
0228 ...         {
0229 ...             $bRetVal = ( $iCurrentPort >= (int) $aMatch['port'] );  /* If port OK */
0230 ...         }
0231 ...         elseif ( preg_match( '/\A(&gt;|>)(?P<port>\d+)/',$szPort,$aMatch ) ) /* Check greater */
0232 ...         {
0233 ...             //var_dump( $aMatch );
0234 ...             $bRetVal = ( $iCurrentPort > (int) $aMatch['port'] );   /* If port OK */
0235 ...         }
0236 ...         elseif ( preg_match( '/\A(&lt;|<)=(?P<port>\d+)/',$szPort,$aMatch ) ) /* Check less or equal */
0237 ...         {
0238 ...             //var_dump( $aMatch );
0239 ...             $bRetVal = ( $iCurrentPort <= (int) $aMatch['port'] );  /* If port OK */
0240 ...         }
0241 ...         elseif ( preg_match( '/\A(&lt;|<)(?P<port>\d+)/',$szPort,$aMatch ) ) /* Check less */
0242 ...         {
0243 ...             //var_dump( $aMatch );
0244 ...             $bRetVal = ( $iCurrentPort < (int) $aMatch['port'] );   /* If port OK */
0245 ...         }
0246 ...         else                                                        /* Check equality */
0247 ...         {
0248 ...             if (  $iCurrentPort == (int) $szPort ) /* If port OK */
0249 ...             {
0250 ...                 $bRetVal = true;                                    /* Ready to return a logical true */
0251 ...             }   /* if ( parse_url( $_SERVER['PHP_SELF'],PHP_URL_PORT ) != 80 ) */
0252 ...         }
0253 ...     }   /* if ( ! STR_Empty( $szReferer ) ) */
0254 ...     else   /* Else of ... if ( ! STR_Empty( $szReferer ) ) */
0255 ...     {
0256 ...         $bRetVal = true;                                            /* Ready to return a logical true */
0257 ...     }   /* End of ... Else of ... if ( ! STR_Empty( $szReferer ) ) */
0258 ... 
0259 ...     return ( $bRetVal );                                            /* Return result to caller */
0260 ... }  /* End of function SYS_IsPortOK() */
0261 ... /* ================================================================== */
0262 ... ?>
0263 ... 

Manifest Constants

VAESOLI_PATH: Define the path where Vae Soli! is installed

VAESOLI_PLUGINS: Define the path where plugins are located

UltraEdit Syntax files

  1. UltraEdit keywords of LSSys.functions.php
  2. UltraEdit Syntax of LSSys.functions.php

Function List (TOC)

  1. SYS_IsDomain(): Determines if a host exists
  2. SYS_IsInternet(): Determines if there is an internet access
  3. SYS_IsPortOK(): Determines if current port (e.g. 80) corresponds to $xPort No assertion found for SYS_IsPortOK() (0 - 0)

Functions of LSSys.functions.php

SYS_IsDomain(): Determines if a host exists

[ back to function list ]

Created: 02/01/2013 17:34

Since version 5.0.0011

Warning

This function does NOT work yet

Syntax

SYS_IsDomain( $szHost )

TODO

Continue to test this new function with nslookup

Parameters
NameTypeDescription
$szHost string Host to test for existance.
Return

(bool) true if $szHost exists; false if not

Assertions

MISC_CastString( SYS_IsDomain( 'localhost' ) ) === 'true' failure

SYS_IsDomain( 'google.com' ) === true successful

Unit Testing

2 assertions: 1 successful; 1 failed

SYS_IsInternet(): Determines if there is an internet access

[ back to function list ]

Syntax

SYS_IsInternet( $szHost,$iPort )

Parameters
NameTypeDescription
$szHost string Host to test for access. Optional. www.google.com by default
$iPort int Port to test for access. Optional. 80 by default
Return

(bool) true if Internet access found; false if not

Example(s)
if ( SYS_IsInternet() )
{
    $oMail = new LSMail();

    $oMail->szHost          = ...;
    $oMail->iPort           = ...;
    $oMail->szMailType      = ...;
    $oMail->szCharset       = ...;
    $oMail->szDomain        = ...;
    $oMail->iPriority       = ...;
    $oMail->szFromName      = ...;
    $oMail->szFromEmail     = ...;
    $oMail->szTo            = ...;
    $oMail->szCC            = ...;
    $oMail->szBCC           = ...;
    $oMail->szSubject       = ...;
    $oMail->szBody          = ...;
    $oMail->aAttachments    = ...;

    $oMail->Send( ... );
}
Assertions

MISC_CastString( SYS_IsInternet( 'localhost' ) ) === 'true' successful

Unit Testing

1 assertions: 1 successful; 0 failed

SYS_IsPortOK(): Determines if current port (e.g. 80) corresponds to $xPort

[ back to function list ]

Syntax

SYS_IsPortOK( $xPort )

Parameters
NameTypeDescription
$xPort mixed Port to check. Can be a string or an int.
Return

(bool) true if current port matches $xPort

Example(s)
// Example #1
if ( SYS_IsPortOK( '80' ) )
{
    echo "We're OK to work on port 80";
}

// Example #2
if ( SYS_IsPortOK( 80 ) )
{
    echo "We're OK to work on port 80";
}
Unit Testing

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

Précédent Suivant