本文整理汇总了PHP中Streams::updateRelation方法的典型用法代码示例。如果您正苦于以下问题:PHP Streams::updateRelation方法的具体用法?PHP Streams::updateRelation怎么用?PHP Streams::updateRelation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Streams
的用法示例。
在下文中一共展示了Streams::updateRelation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Streams_related_put
/**
* Used to update relations
*
* @param array $_REQUEST
* toPublisherId, toStreamName, type, fromPublisherId, fromStreamName
* weight, adjustWeights
* @return {void}
*/
function Streams_related_put($params)
{
$user = Users::loggedInUser(true);
$userId = $user ? $user->id : '';
$toPublisherId = $_REQUEST['toPublisherId'];
$toStreamName = $_REQUEST['toStreamName'];
$type = $_REQUEST['type'];
$fromPublisherId = $_REQUEST['fromPublisherId'];
$fromStreamName = $_REQUEST['fromStreamName'];
$weight = $_REQUEST['weight'];
$adjustWeights = isset($_REQUEST['adjustWeights']) ? $_REQUEST['adjustWeights'] : null;
$result = Streams::updateRelation($userId, $toPublisherId, $toStreamName, $type, $fromPublisherId, $fromStreamName, $weight, $adjustWeights);
Q_Response::setSlot('result', $result);
}