本文整理匯總了PHP中aql::get_decrypt_key方法的典型用法代碼示例。如果您正苦於以下問題:PHP aql::get_decrypt_key方法的具體用法?PHP aql::get_decrypt_key怎麽用?PHP aql::get_decrypt_key使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類aql
的用法示例。
在下文中一共展示了aql::get_decrypt_key方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __set
/**
* Magic Setter -- sets values to $this->_data
* If $name looks like an ide, the ID version is set
* Adds to errors if setting an invalid property
*
* @param string $name
* @param mixed $value
* @return Model $this
*/
public function __set($name, $value)
{
// check to see if this is a valid property or IDE
$is_ide = preg_match('/_ide$/', $name);
// if this is property does not exist we add it as a property to the object
if (!$this->propertyExists($name)) {
$this->addProperty($name);
}
// cast to array or to ModelArrayObject as necessary
$value = $this->prepSetValue($value);
$this->_data[$name] = $value;
// if is IDE, add as an ID as well
if ($is_ide) {
$key = aql::get_decrypt_key($name);
// decrypt ide
$n_name = substr($name, 0, -1);
// remove e (from ide)
$this->_data[$n_name] = decrypt($value, $key);
}
return $this;
}
示例2: getFilterParamArgs
/**
* Gets the proper method name and args to pass to it
* @param string $value
* @param string $operator
* @param string $property
* @return array [method arg]
*/
protected static function getFilterParamArgs($value, $operator, $property)
{
if (!is_numeric($value)) {
$decrypted = decrypt($value, aql::get_decrypt_key($property . 'e'));
if ($decrypted) {
$value = $decrypted;
} else {
$property = $operator;
}
}
return array('set_' . $property, array($value));
}