本文整理匯總了PHP中ProjectSettings::hasEncryptedFields方法的典型用法代碼示例。如果您正苦於以下問題:PHP ProjectSettings::hasEncryptedFields方法的具體用法?PHP ProjectSettings::hasEncryptedFields怎麽用?PHP ProjectSettings::hasEncryptedFields使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ProjectSettings
的用法示例。
在下文中一共展示了ProjectSettings::hasEncryptedFields方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DecryptFetchedArray
/**
* DecryptFetchedArray
* Fetching record from sql result, looking through array of fetched values and decrypted all encrypted fields
* @param {reference} link to sql result
* @return {array} fetched array
*/
function DecryptFetchedArray($sqlResult, $table = ""){
$pSet = $this->pSet;
if($table == "")
$table = $this->strTableName;
else
if($table != $this->strTableName)
$pSet = new ProjectSettings($table);
$result = array();
$fetchedArray = db_fetch_array($sqlResult);
if($fetchedArray){
if(!$pSet->hasEncryptedFields() || !isEncryptionByPHPEnabled())
return $fetchedArray;
foreach ($fetchedArray as $fieldName => $fieldValue){
$result[$fieldName] = $this->DecryptField($fieldName, $fieldValue);
}
}
return $result;
}
示例2: GetFullFieldName
function GetFullFieldName($field, $table = "", $addAs = true)
{
if ($table == "") {
global $strTableName;
$table = $strTableName;
}
$pSet = new ProjectSettings($table);
$fname = $pSet->getFullNameField($field);
if ($pSet->hasEncryptedFields() && !isEncryptionByPHPEnabled()) {
$cipherer = new RunnerCipherer($table);
return $cipherer->GetFieldName($fname, $field) . ($cipherer->isFieldEncrypted($field) && $addAs ? " as " . AddFieldWrappers($field) : "");
}
return $fname;
}