PageRenderTime 25ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/testing/tools/wikidocs/docs/CookieStorage.htm

http://github.com/ColdBox/coldbox-platform
HTML | 199 lines | 129 code | 70 blank | 0 comment | 0 complexity | 33231246f71d83b853acfed64caf07ae MD5 | raw file
Possible License(s): CPL-1.0, Apache-2.0
  1. [[Dashboard | << Back to Dashboard ]]
  2. {| align="right"
  3. | __TOC__
  4. |}
  5. = Exploring the CookieStorage Plugin =
  6. == Overview ==
  7. Cookie Storage plugin. It provides the user with a mechanism for permanent data storage using the cookie scope.
  8. == getEncryptionAlgorithm ==
  9. Get the EncryptionAlgorithm
  10. === Returns ===
  11. * This function returns ''string''
  12. === Examples ===
  13. == setVar ==
  14. Set a new permanent variable in the storage.
  15. === Returns ===
  16. * This function returns ''void''
  17. === Arguments ===
  18. {| cellpadding="5", class="tablelisting"
  19. ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
  20. |-
  21. | name || string || Yes || --- || The name of the variable.
  22. |-
  23. | value || any || Yes || --- || The value to set in the variable, simple, array, query or structure.
  24. |-
  25. | expires || numeric || No || 0 || Cookie Expire in number of days. [default cookie is session only = 0 days]
  26. |-
  27. | secure || boolean || No || false || If browser does not support Secure Sockets Layer (SSL) security, the cookie is not sent. To use the cookie, the page must be accessed using the https protocol.
  28. |-
  29. | path || string || No || || URL, within a domain, to which the cookie applies; typically a directory. Only pages in this path can use the cookie. By default, all pages on the server that set the cookie can access the cookie.
  30. |-
  31. | domain || string || No || || Domain in which cookie is valid and to which cookie content can be sent from the user's system.
  32. |}
  33. === Examples ===
  34. == getEncryptionKey ==
  35. Get the EncryptionKey
  36. === Returns ===
  37. * This function returns ''string''
  38. === Examples ===
  39. == getVar ==
  40. Get a new permanent variable. If the cookie does not exist. The method returns blank or use the default value argument
  41. === Returns ===
  42. * This function returns ''any''
  43. === Arguments ===
  44. {| cellpadding="5", class="tablelisting"
  45. ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
  46. |-
  47. | name || string || Yes || --- || The variable name to retrieve.
  48. |-
  49. | default || any || No || || The default value to set. If not used, a blank is returned.
  50. |}
  51. === Examples ===
  52. == setEncryptionAlgorithm ==
  53. Set EncryptionAlgorithm for this storage
  54. === Returns ===
  55. * This function returns ''void''
  56. === Arguments ===
  57. {| cellpadding="5", class="tablelisting"
  58. ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
  59. |-
  60. | EncryptionAlgorithm || string || Yes || --- ||
  61. |}
  62. === Examples ===
  63. == setEncryptionEncoding ==
  64. Set EncryptionEncoding value
  65. === Returns ===
  66. * This function returns ''void''
  67. === Arguments ===
  68. {| cellpadding="5", class="tablelisting"
  69. ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
  70. |-
  71. | EncryptionEncoding || string || Yes || --- ||
  72. |}
  73. === Examples ===
  74. == getEncryptionEncoding ==
  75. Get EncryptionEncoding value
  76. === Returns ===
  77. * This function returns ''string''
  78. === Examples ===
  79. == getEncryption ==
  80. Get Encryption flag
  81. === Returns ===
  82. * This function returns ''boolean''
  83. === Examples ===
  84. == exists ==
  85. Checks wether the permanent variable exists in the storage
  86. === Returns ===
  87. * This function returns ''boolean''
  88. === Arguments ===
  89. {| cellpadding="5", class="tablelisting"
  90. ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
  91. |-
  92. | name || string || Yes || --- || The variable name to retrieve.
  93. |}
  94. === Examples ===
  95. == deleteVar ==
  96. Tries to delete a permanent cookie variable
  97. === Returns ===
  98. * This function returns ''boolean''
  99. === Arguments ===
  100. {| cellpadding="5", class="tablelisting"
  101. ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
  102. |-
  103. | name || string || Yes || --- || The variable name to retrieve.
  104. |-
  105. | domain || string || No || || Domain in which cookie is valid and to which cookie content can be sent from the user's system.
  106. |}
  107. === Examples ===
  108. == setEncryption ==
  109. Set Encryption flag
  110. === Returns ===
  111. * This function returns ''void''
  112. === Arguments ===
  113. {| cellpadding="5", class="tablelisting"
  114. ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
  115. |-
  116. | Encryption || boolean || Yes || --- ||
  117. |}
  118. === Examples ===
  119. == setEncryptionKey ==
  120. Set EncryptionKey for this storage
  121. === Returns ===
  122. * This function returns ''void''
  123. === Arguments ===
  124. {| cellpadding="5", class="tablelisting"
  125. ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description'''
  126. |-
  127. | EncryptionKey || string || Yes || --- ||
  128. |}
  129. === Examples ===