本文整理汇总了PHP中FArrayHelper::setValue方法的典型用法代码示例。如果您正苦于以下问题:PHP FArrayHelper::setValue方法的具体用法?PHP FArrayHelper::setValue怎么用?PHP FArrayHelper::setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FArrayHelper
的用法示例。
在下文中一共展示了FArrayHelper::setValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setValuesFromEncryt
/**
* Element plugin specific method for setting unecrypted values baack into post data
*
* @param array &$post data passed by ref
* @param string $key key
* @param string $data elements unencrypted data
*
* @return void
*/
public function setValuesFromEncryt(&$post, $key, $data)
{
$group = $this->getGroup();
if ($group->isJoin()) {
$jkey = 'join.' . $group->getGroup()->join_id . '.' . $key;
FArrayHelper::setValue($post, $jkey, $data);
FArrayHelper::setValue($_REQUEST, $jkey, $data);
// Seems the only way to add it into $post? FArrayHelper bug I guess but too scared to alter that at the moement
$post['join'][$group->getGroup()->join_id][$key] = $data;
} else {
FArrayHelper::setValue($post, $key, $data);
FArrayHelper::setValue($_REQUEST, $key, $data);
}
// $$$rob even though $post is passed by reference - by adding in the value
// we arent actually modifiying the $_POST var that post was created from
JRequest::setVar($key, $data);
}
示例2: setValuesFromEncryt
/**
* element plugin specific method for setting unecrypted values baack into post data
* @param aray $post data passed by ref
* @param string $key
* @param string $data elements unencrypted data
* @return null
*/
function setValuesFromEncryt(&$post, $key, $data)
{
$group = $this->getGroup();
if ($group->isJoin()) {
$key = 'join.' . $group->getGroup()->join_id . '.' . $key;
FArrayHelper::setValue($post, $key, $data);
FArrayHelper::setValue($_REQUEST, $key, $data);
} else {
FArrayHelper::setValue($post, $key, $data);
FArrayHelper::setValue($_REQUEST, $key, $data);
}
// $$$rob even though $post is passed by reference - by adding in the value
// we arent actually modifiying the $_POST var that post was created from
JRequest::setVar($key, $data);
}
示例3: setValuesFromEncryt
/**
* Element plugin specific method for setting unencrypted values back into post data
*
* @param array &$post Data passed by ref
* @param string $key Key
* @param string $data Elements unencrypted data
*
* @return void
*/
public function setValuesFromEncryt(&$post, $key, $data)
{
FArrayHelper::setValue($post, $key, $data);
FArrayHelper::setValue($_REQUEST, $key, $data);
// $$$rob even though $post is passed by reference - by adding in the value
// we aren't actually modifying the $_POST var that post was created from
$this->app->input->set($key, $data);
}