本文整理汇总了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;
}