ePages 7.27.0 - DE_EPAGES/Presentation/API/HttpToHttps.pm

Package DE_EPAGES::Presentation::API::Scripts::HttpToHttps

api for changeHttpToHttps script

Package DE_EPAGES::Presentation::API::HttpToHttps

Functions

_buildHash
_getResourceList
backupData
getTargetList
new
readBackupData
updateTargetList

_buildHash

Builds and array of hashes.

Syntax
$aTargetHash = self->__BuildHash($hData, $aShopIds)
Input
$aHashData
hash array which contains initially table
$aShopIDs
array of shop ids
Return
following hashes:
  • Table - string value
  • Shops - array of following hashes
    • ShopId
    • Sources - array of following hashes
      • Links - array of http links to be replaced
      • Value - string value which contains links above
      • ObjectId - int id of the object
      • AttributeId - int id of the attribute of corresponding object
      • LanguageId - int id of the language of corresponding value (optional)


_getResourceList

Builds and array of hashes vor specific shop.

Syntax
$aTargetHash = self->__GetResourceList($hData, $aShopIds)
Input
$Table
string - table name where to search for http's
$ShopId
int - shop id
Return
array of following hashes:
  • Table - string value
  • Shops - array of following hashes
    • ShopId
    • Sources - array of following hashes
      • Links - array of http links to be replaced
      • Value - string value which contains links above
      • ObjectId - int id of the object
      • AttributeId - int id of the attribute of corresponding object
      • LanguageId - int id of the language of corresponding value (optional)


backupData

Stores data into a file.

Syntax
BackupData($aTargetHashList)
Return
$BackupFile (full path to backup file)
string

getTargetList

Gets list of hashes which contains values with http to replace.

Syntax
$aTargetHashList = $Package->GetTargetList();
Return
(array of following hashes:
  • Table - string value
  • Shops - array of following hashes
    • ShopId
    • Sources - array of following hashes
      • Links - array of http links to be replaced
      • Value - string value which contains links above
      • ObjectId - int id of the object
      • AttributeId - int id of the attribute of corresponding object
      • LanguageId - int id of the language of corresponding value (optional)


)
$aData

new

Creates a new object of DE_EPAGES::Presentation::API::Scripts::HttpToHttps.

Syntax
$Object = DE_EPAGES::Presentation::API::Scripts::HttpToHttps->new();
Return
(object)
$Object

readBackupData

Reads data from backup and converts it back to corresponding perl type.

Syntax
$aTargetHashList = ReadBackupData()

updateTargetList

Replaces http->https or https->http depending on input parameter.

Syntax
$Package->UpdateTargetList($Direction, $aData);
Input
$Direction
string has one of the following values ['http2https', 'https2http']
$aData
array of following hashes:
  • Table - string value
  • Shops - array of following hashes
    • ShopId
    • Sources - array of following hashes
      • Links - array of http links to be replaced
      • Value - string value which contains links above
      • ObjectId - int id of the object
      • AttributeId - int id of the attribute of corresponding object
      • LanguageId - int id of the language of corresponding value (optional)