[[Dashboard | << Back to Dashboard ]] {| align="right" | __TOC__ |} = Exploring the CookieStorage Plugin = == Overview == Cookie Storage plugin. It provides the user with a mechanism for permanent data storage using the cookie scope. == getEncryptionAlgorithm == Get the EncryptionAlgorithm === Returns === * This function returns ''string'' === Examples === == setVar == Set a new permanent variable in the storage. === Returns === * This function returns ''void'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | name || string || Yes || --- || The name of the variable. |- | value || any || Yes || --- || The value to set in the variable, simple, array, query or structure. |- | expires || numeric || No || 0 || Cookie Expire in number of days. [default cookie is session only = 0 days] |- | 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. |- | 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. |- | domain || string || No || || Domain in which cookie is valid and to which cookie content can be sent from the user's system. |} === Examples === == getEncryptionKey == Get the EncryptionKey === Returns === * This function returns ''string'' === Examples === == getVar == Get a new permanent variable. If the cookie does not exist. The method returns blank or use the default value argument === Returns === * This function returns ''any'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | name || string || Yes || --- || The variable name to retrieve. |- | default || any || No || || The default value to set. If not used, a blank is returned. |} === Examples === == setEncryptionAlgorithm == Set EncryptionAlgorithm for this storage === Returns === * This function returns ''void'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | EncryptionAlgorithm || string || Yes || --- || |} === Examples === == setEncryptionEncoding == Set EncryptionEncoding value === Returns === * This function returns ''void'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | EncryptionEncoding || string || Yes || --- || |} === Examples === == getEncryptionEncoding == Get EncryptionEncoding value === Returns === * This function returns ''string'' === Examples === == getEncryption == Get Encryption flag === Returns === * This function returns ''boolean'' === Examples === == exists == Checks wether the permanent variable exists in the storage === Returns === * This function returns ''boolean'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | name || string || Yes || --- || The variable name to retrieve. |} === Examples === == deleteVar == Tries to delete a permanent cookie variable === Returns === * This function returns ''boolean'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | name || string || Yes || --- || The variable name to retrieve. |- | domain || string || No || || Domain in which cookie is valid and to which cookie content can be sent from the user's system. |} === Examples === == setEncryption == Set Encryption flag === Returns === * This function returns ''void'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | Encryption || boolean || Yes || --- || |} === Examples === == setEncryptionKey == Set EncryptionKey for this storage === Returns === * This function returns ''void'' === Arguments === {| cellpadding="5", class="tablelisting" ! '''Key''' !! '''Type''' !! '''Required''' !! '''Default''' !! '''Description''' |- | EncryptionKey || string || Yes || --- || |} === Examples ===